summaryrefslogtreecommitdiff
path: root/src/testdir/test_options.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-11-25 22:04:13 +0100
committerBram Moolenaar <Bram@vim.org>2016-11-25 22:04:13 +0100
commit7554da4033498c4da0af3cde542c3e87e9097b73 (patch)
tree2b2840469dade389e038bc94fb0e9c64d25f39fe /src/testdir/test_options.vim
parent031cb743ae154cfb727a9b7787bdcb61202ff1c8 (diff)
downloadvim-git-7554da4033498c4da0af3cde542c3e87e9097b73.tar.gz
patch 8.0.0102v8.0.0102
Problem: Cannot set 'dictionary' to a path. Solution: Allow for slash and backslash. Add a test (partly by Daisuke Suzuki, closes #1279, closes #1284)
Diffstat (limited to 'src/testdir/test_options.vim')
-rw-r--r--src/testdir/test_options.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim
index 3b6f6625f..88be8f9c5 100644
--- a/src/testdir/test_options.vim
+++ b/src/testdir/test_options.vim
@@ -106,3 +106,18 @@ func Test_keymap_valid()
call assert_fails(":set kmp=trunc\x00name", "E544:")
call assert_fails(":set kmp=trunc\x00name", "trunc")
endfunc
+
+func Test_dictionary()
+ " Check that it's possible to set the option.
+ set dictionary=/usr/share/dict/words
+ call assert_equal('/usr/share/dict/words', &dictionary)
+ set dictionary=/usr/share/dict/words,/and/there
+ call assert_equal('/usr/share/dict/words,/and/there', &dictionary)
+ set dictionary=/usr/share/dict\ words
+ call assert_equal('/usr/share/dict words', &dictionary)
+
+ " Check rejecting weird characters.
+ call assert_fails("set dictionary=/not&there", "E474:")
+ call assert_fails("set dictionary=/not>there", "E474:")
+ call assert_fails("set dictionary=/not.*there", "E474:")
+endfunc