comparison src/testdir/test_options.vim @ 10416:ef5474130b0e v8.0.0102

commit https://github.com/vim/vim/commit/7554da4033498c4da0af3cde542c3e87e9097b73 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Nov 25 22:04:13 2016 +0100 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 https://github.com/vim/vim/issues/1279, closes https://github.com/vim/vim/issues/1284)
author Christian Brabandt <cb@256bit.org>
date Fri, 25 Nov 2016 22:15:04 +0100
parents ecbd3412f214
children 7a631c6b0a20
comparison
equal deleted inserted replaced
10415:660440b1adcf 10416:ef5474130b0e
104 call assert_fails(":set kmp=wrong\\\nname", "E474:") 104 call assert_fails(":set kmp=wrong\\\nname", "E474:")
105 105
106 call assert_fails(":set kmp=trunc\x00name", "E544:") 106 call assert_fails(":set kmp=trunc\x00name", "E544:")
107 call assert_fails(":set kmp=trunc\x00name", "trunc") 107 call assert_fails(":set kmp=trunc\x00name", "trunc")
108 endfunc 108 endfunc
109
110 func Test_dictionary()
111 " Check that it's possible to set the option.
112 set dictionary=/usr/share/dict/words
113 call assert_equal('/usr/share/dict/words', &dictionary)
114 set dictionary=/usr/share/dict/words,/and/there
115 call assert_equal('/usr/share/dict/words,/and/there', &dictionary)
116 set dictionary=/usr/share/dict\ words
117 call assert_equal('/usr/share/dict words', &dictionary)
118
119 " Check rejecting weird characters.
120 call assert_fails("set dictionary=/not&there", "E474:")
121 call assert_fails("set dictionary=/not>there", "E474:")
122 call assert_fails("set dictionary=/not.*there", "E474:")
123 endfunc