0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

patch 7.4.1017

Problem:    When there is a backslash in an option ":set -=" doesn't work.
Solution:   Handle a backslash better. (Jacob Niehus)  Add a new test, merge
            in old test.
This commit is contained in:
Bram Moolenaar
2016-01-01 14:48:20 +01:00
parent 8dfc5eb328
commit 8f79acdf7e
8 changed files with 40 additions and 18 deletions

27
src/testdir/test_set.vim Normal file
View File

@@ -0,0 +1,27 @@
" Tests for the :set command
function Test_set_backslash()
let isk_save = &isk
set isk=a,b,c
set isk+=d
call assert_equal('a,b,c,d', &isk)
set isk+=\\,e
call assert_equal('a,b,c,d,\,e', &isk)
set isk-=e
call assert_equal('a,b,c,d,\', &isk)
set isk-=\\
call assert_equal('a,b,c,d', &isk)
let &isk = isk_save
endfunction
function Test_set_add()
let wig_save = &wig
set wildignore=*.png,
set wildignore+=*.jpg
call assert_equal('*.png,*.jpg', &wig)
let &wig = wig_save
endfunction