summaryrefslogtreecommitdiff
path: root/src/testdir/test_set.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-01-01 14:48:20 +0100
committerBram Moolenaar <Bram@vim.org>2016-01-01 14:48:20 +0100
commit8f79acdf7ede2693fbda53c3c9693f16db4f193b (patch)
treeb897f76e3c986698541a575f74034c0ae358d853 /src/testdir/test_set.vim
parent8dfc5eb32818b11ff5818a060324b94345c40031 (diff)
downloadvim-git-8f79acdf7ede2693fbda53c3c9693f16db4f193b.tar.gz
patch 7.4.1017v7.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.
Diffstat (limited to 'src/testdir/test_set.vim')
-rw-r--r--src/testdir/test_set.vim27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/testdir/test_set.vim b/src/testdir/test_set.vim
new file mode 100644
index 000000000..b98046384
--- /dev/null
+++ b/src/testdir/test_set.vim
@@ -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