aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/set_spec.lua
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2016-05-10 21:24:15 -0400
committerJames McCoy <jamessan@jamessan.com>2016-05-20 21:43:15 -0400
commit8a379aacd758056a89dfbd5e1a4d702ec57e9138 (patch)
tree6621a5bfd2bf474188fe9dee4f84ea884232228e /test/functional/legacy/set_spec.lua
parent9d3449852bd35c9283948186d0259c1bf73b8579 (diff)
downloadrneovim-8a379aacd758056a89dfbd5e1a4d702ec57e9138.tar.gz
rneovim-8a379aacd758056a89dfbd5e1a4d702ec57e9138.tar.bz2
rneovim-8a379aacd758056a89dfbd5e1a4d702ec57e9138.zip
vim-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. https://github.com/vim/vim/commit/8f79acdf7ede2693fbda53c3c9693f16db4f193b
Diffstat (limited to 'test/functional/legacy/set_spec.lua')
-rw-r--r--test/functional/legacy/set_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/legacy/set_spec.lua b/test/functional/legacy/set_spec.lua
index f81fcd3700..f2c907084e 100644
--- a/test/functional/legacy/set_spec.lua
+++ b/test/functional/legacy/set_spec.lua
@@ -7,6 +7,21 @@ local clear, execute, eval, eq =
describe(':set', function()
before_each(clear)
+ it('handles backslash properly', function()
+ execute('set iskeyword=a,b,c')
+ execute('set iskeyword+=d')
+ eq('a,b,c,d', eval('&iskeyword'))
+
+ execute([[set iskeyword+=\\,e]])
+ eq([[a,b,c,d,\,e]], eval('&iskeyword'))
+
+ execute('set iskeyword-=e')
+ eq([[a,b,c,d,\]], eval('&iskeyword'))
+
+ execute([[set iskeyword-=\]])
+ eq('a,b,c,d', eval('&iskeyword'))
+ end)
+
it('recognizes a trailing comma with +=', function()
execute('set wildignore=*.png,')
execute('set wildignore+=*.jpg')