From 69e5427be170d98a413edb1e191254f84d8642f6 Mon Sep 17 00:00:00 2001 From: watiko Date: Tue, 9 Feb 2016 14:10:55 +0900 Subject: 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 --- test/functional/legacy/options_spec.lua | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'test') 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) -- cgit