1 To: vim_dev@googlegroups.com
2 Subject: Patch 8.0.0104
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Value of 'thesaurus' option not checked properly.
12 Solution: Add P_NDNAME flag. (Daisuke Suzuki)
13 Files: src/option.c, src/testdir/test_options.vim
16 *** ../vim-8.0.0103/src/option.c 2016-11-25 22:04:09.607397081 +0100
17 --- src/option.c 2016-11-26 17:35:20.089224386 +0100
20 {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
21 (char_u *)&p_tw, PV_TW,
22 {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
23 ! {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP,
24 #ifdef FEAT_INS_EXPAND
25 (char_u *)&p_tsr, PV_TSR,
28 {"textwidth", "tw", P_NUM|P_VI_DEF|P_VIM|P_RBUF,
29 (char_u *)&p_tw, PV_TW,
30 {(char_u *)0L, (char_u *)0L} SCRIPTID_INIT},
31 ! {"thesaurus", "tsr", P_STRING|P_EXPAND|P_VI_DEF|P_ONECOMMA|P_NODUP|P_NDNAME,
32 #ifdef FEAT_INS_EXPAND
33 (char_u *)&p_tsr, PV_TSR,
35 *** ../vim-8.0.0103/src/testdir/test_options.vim 2016-11-25 22:04:09.607397081 +0100
36 --- src/testdir/test_options.vim 2016-11-26 17:41:00.722891085 +0100
39 call assert_fails(":set kmp=trunc\x00name", "trunc")
42 ! func Test_dictionary()
43 " Check that it's possible to set the option.
44 ! set dictionary=/usr/share/dict/words
45 ! call assert_equal('/usr/share/dict/words', &dictionary)
46 ! set dictionary=/usr/share/dict/words,/and/there
47 ! call assert_equal('/usr/share/dict/words,/and/there', &dictionary)
48 ! set dictionary=/usr/share/dict\ words
49 ! call assert_equal('/usr/share/dict words', &dictionary)
51 " Check rejecting weird characters.
52 ! call assert_fails("set dictionary=/not&there", "E474:")
53 ! call assert_fails("set dictionary=/not>there", "E474:")
54 ! call assert_fails("set dictionary=/not.*there", "E474:")
57 call assert_fails(":set kmp=trunc\x00name", "trunc")
60 ! func Check_dir_option(name)
61 " Check that it's possible to set the option.
62 ! exe 'set ' . a:name . '=/usr/share/dict/words'
63 ! call assert_equal('/usr/share/dict/words', eval('&' . a:name))
64 ! exe 'set ' . a:name . '=/usr/share/dict/words,/and/there'
65 ! call assert_equal('/usr/share/dict/words,/and/there', eval('&' . a:name))
66 ! exe 'set ' . a:name . '=/usr/share/dict\ words'
67 ! call assert_equal('/usr/share/dict words', eval('&' . a:name))
69 " Check rejecting weird characters.
70 ! call assert_fails("set " . a:name . "=/not&there", "E474:")
71 ! call assert_fails("set " . a:name . "=/not>there", "E474:")
72 ! call assert_fails("set " . a:name . "=/not.*there", "E474:")
75 ! func Test_dictionary()
76 ! call Check_dir_option('dictionary')
79 ! func Test_thesaurus()
80 ! call Check_dir_option('thesaurus')
82 *** ../vim-8.0.0103/src/version.c 2016-11-26 15:13:29.410218034 +0100
83 --- src/version.c 2016-11-26 17:36:23.568793629 +0100
87 { /* Add new patch number below this line */
93 Never go to the toilet in a paperless office.
95 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
96 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
97 \\\ an exciting new programming language -- http://www.Zimbu.org ///
98 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///