aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/options_spec.lua
diff options
context:
space:
mode:
authorwatiko <service@mail.watiko.net>2016-02-09 14:10:55 +0900
committerwatiko <service@mail.watiko.net>2016-02-09 14:44:53 +0900
commit69e5427be170d98a413edb1e191254f84d8642f6 (patch)
tree18d43a3130dca89367a1dacff9f7fbcc85076018 /test/functional/legacy/options_spec.lua
parentc90c47072fbc282c3c6a69d945e9ad7079862a0a (diff)
downloadrneovim-69e5427be170d98a413edb1e191254f84d8642f6.tar.gz
rneovim-69e5427be170d98a413edb1e191254f84d8642f6.tar.bz2
rneovim-69e5427be170d98a413edb1e191254f84d8642f6.zip
vim-patch:7.4.915
Problem: When removing from 'path' and then adding, a comma may go missing. (Malcolm Rowe) Solution: Fix the check for P_ONECOMMA. (closes #471) https://github.com/vim/vim/commit/174674743d9a2d7361c9cd89836f8dd8651edeeb
Diffstat (limited to 'test/functional/legacy/options_spec.lua')
-rw-r--r--test/functional/legacy/options_spec.lua22
1 files changed, 18 insertions, 4 deletions
diff --git a/test/functional/legacy/options_spec.lua b/test/functional/legacy/options_spec.lua
index 773acb9663..21e99c4aa1 100644
--- a/test/functional/legacy/options_spec.lua
+++ b/test/functional/legacy/options_spec.lua
@@ -1,13 +1,27 @@
--- Test if ":options" throws any exception. The options window seems to mess
--- other tests, so restart nvim in the teardown hook
-
local helpers = require('test.functional.helpers')
local command, clear = helpers.command, helpers.clear
+local source, expect = helpers.source, helpers.expect
describe('options', function()
setup(clear)
- it('is working', function()
+ it('should not throw any exception', function()
command('options')
end)
end)
+
+describe('set', function()
+ setup(clear)
+
+ it("should keep two comma when 'path' is changed", function()
+ source([[
+ set path=foo,,bar
+ set path-=bar
+ set path+=bar
+ $put =&path]])
+
+ expect([[
+
+ foo,,bar]])
+ end)
+end)