diff options
| author | ckelsel <ckelsel@hotmail.com> | 2017-09-24 11:54:40 +0800 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2017-09-24 12:49:16 +0800 |
| commit | cd13c24427a3191c7383b76a0bf9467bee2736e3 (patch) | |
| tree | 59451c6ee4c5f42500d6db549e923677fc0f5889 /src/nvim/testdir | |
| parent | d2eba872fb80ec9ace3a244aa706e55c82a48e83 (diff) | |
| download | rneovim-cd13c24427a3191c7383b76a0bf9467bee2736e3.tar.gz rneovim-cd13c24427a3191c7383b76a0bf9467bee2736e3.tar.bz2 rneovim-cd13c24427a3191c7383b76a0bf9467bee2736e3.zip | |
vim-patch:8.0.0102
Problem: Cannot set 'dictionary' to a path.
Solution: Allow for slash and backslash. Add a test (partly by Daisuke
Suzuki, closes vim/vim#1279, closes vim/vim#1284)
https://github.com/vim/vim/commit/7554da4033498c4da0af3cde542c3e87e9097b73
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_options.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 2ffe63787b..ea020d9ca0 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -103,3 +103,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 |