patch 7.4.2174
Problem: Adding duplicate flags to 'whichwrap' leaves commas behind.
Solution: Also remove the commas. (Naruhiko Nishino)
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index e7e4c68..02f2611 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -101,7 +101,6 @@
test_mapping.out \
test_marks.out \
test_nested_function.out \
- test_options.out \
test_search_mbyte.out \
test_signs.out \
test_tagcase.out \
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
index 0245fad..8dd6984 100644
--- a/src/testdir/test_alot.vim
+++ b/src/testdir/test_alot.vim
@@ -38,3 +38,4 @@
source test_true_false.vim
source test_unlet.vim
source test_window_cmd.vim
+source test_options.vim
diff --git a/src/testdir/test_options.in b/src/testdir/test_options.in
deleted file mode 100644
index 6e56fa2..0000000
--- a/src/testdir/test_options.in
+++ /dev/null
@@ -1,23 +0,0 @@
-Test for ":options".
-
-STARTTEST
-:so small.vim
-:let caught = 'ok'
-:try
- :options
-:catch
- :let caught = v:throwpoint . "\n" . v:exception
-:endtry
-:buf 1
-:$put =caught
-:"
-:" Test that changing 'path' keeps two commas.
-:set path=foo,,bar
-:set path-=bar
-:set path+=bar
-:$put =&path
-:/^result/,$w! test.out
-:qa!
-ENDTEST
-
-result
diff --git a/src/testdir/test_options.ok b/src/testdir/test_options.ok
deleted file mode 100644
index 0773152..0000000
--- a/src/testdir/test_options.ok
+++ /dev/null
@@ -1,3 +0,0 @@
-result
-ok
-foo,,bar
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
new file mode 100644
index 0000000..cceb180
--- /dev/null
+++ b/src/testdir/test_options.vim
@@ -0,0 +1,40 @@
+" Test for options
+
+function! Test_whichwrap()
+ set whichwrap=b,s
+ call assert_equal('b,s', &whichwrap)
+
+ set whichwrap+=h,l
+ call assert_equal('b,s,h,l', &whichwrap)
+
+ set whichwrap+=h,l
+ call assert_equal('b,s,h,l', &whichwrap)
+
+ set whichwrap+=h,l
+ call assert_equal('b,s,h,l', &whichwrap)
+
+ set whichwrap&
+endfunction
+
+function! Test_options()
+ let caught = 'ok'
+ try
+ options
+ catch
+ let caught = v:throwpoint . "\n" . v:exception
+ endtry
+ call assert_equal('ok', caught)
+
+ " close option-window
+ close
+endfunction
+
+function! Test_path_keep_commas()
+ " Test that changing 'path' keeps two commas.
+ set path=foo,,bar
+ set path-=bar
+ set path+=bar
+ call assert_equal('foo,,bar', &path)
+
+ set path&
+endfunction