diff options
| author | James McCoy <jamessan@jamessan.com> | 2017-10-17 12:48:48 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-17 12:48:48 -0400 |
| commit | 0f0fcce1ab5736fb0d34c1f6e86456cd605cfa52 (patch) | |
| tree | 8acafa07288dbcc2087e5c4b5caaeba7ca465093 /src/nvim/testdir | |
| parent | 2f4647e77b7e8271aad1b45eb07fbabed78d9fe6 (diff) | |
| parent | 7d3f302ef97fc1bb0b6c6b65950a6825ea740cd5 (diff) | |
| download | rneovim-0f0fcce1ab5736fb0d34c1f6e86456cd605cfa52.tar.gz rneovim-0f0fcce1ab5736fb0d34c1f6e86456cd605cfa52.tar.bz2 rneovim-0f0fcce1ab5736fb0d34c1f6e86456cd605cfa52.zip | |
Merge pull request #7313 from ckelsel/vim-8.0.0101
vim-patch:8.0.0101,8.0.0102,8.0.0104,8.0.0106
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_options.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 8a9d793a2e..08ee00e352 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -104,6 +104,29 @@ func Test_keymap_valid() call assert_fails(":set kmp=trunc\x00name", "trunc") endfunc +func Check_dir_option(name) + " Check that it's possible to set the option. + exe 'set ' . a:name . '=/usr/share/dict/words' + call assert_equal('/usr/share/dict/words', eval('&' . a:name)) + exe 'set ' . a:name . '=/usr/share/dict/words,/and/there' + call assert_equal('/usr/share/dict/words,/and/there', eval('&' . a:name)) + exe 'set ' . a:name . '=/usr/share/dict\ words' + call assert_equal('/usr/share/dict words', eval('&' . a:name)) + + " Check rejecting weird characters. + call assert_fails("set " . a:name . "=/not&there", "E474:") + call assert_fails("set " . a:name . "=/not>there", "E474:") + call assert_fails("set " . a:name . "=/not.*there", "E474:") +endfunc + +func Test_dictionary() + call Check_dir_option('dictionary') +endfunc + +func Test_thesaurus() + call Check_dir_option('thesaurus') +endfunc + func Test_complete() " Trailing single backslash used to cause invalid memory access. set complete=s\ |