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:
27
src/testdir/test_set.vim
Normal file
27
src/testdir/test_set.vim
Normal 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
|
Reference in New Issue
Block a user