vim-patch: 8.0.0104

Problem:    Value of 'thesaurus' option not checked properly.
Solution:   Add P_NDNAME flag. (Daisuke Suzuki)
f422bcc7f9
This commit is contained in:
ckelsel 2017-09-24 12:52:55 +08:00
commit 172722ec51
3 changed files with 20 additions and 11 deletions

View File

@ -2451,6 +2451,7 @@ return {
full_name='thesaurus', abbreviation='tsr', full_name='thesaurus', abbreviation='tsr',
type='string', list='onecomma', scope={'global', 'buffer'}, type='string', list='onecomma', scope={'global', 'buffer'},
deny_duplicates=true, deny_duplicates=true,
normal_dname_chars=true,
vi_def=true, vi_def=true,
expand=true, expand=true,
varname='p_tsr', varname='p_tsr',

View File

@ -104,17 +104,25 @@ func Test_keymap_valid()
call assert_fails(":set kmp=trunc\x00name", "trunc") call assert_fails(":set kmp=trunc\x00name", "trunc")
endfunc endfunc
func Test_dictionary() func Check_dir_option(name)
" Check that it's possible to set the option. " Check that it's possible to set the option.
set dictionary=/usr/share/dict/words exe 'set ' . a:name . '=/usr/share/dict/words'
call assert_equal('/usr/share/dict/words', &dictionary) call assert_equal('/usr/share/dict/words', eval('&' . a:name))
set dictionary=/usr/share/dict/words,/and/there exe 'set ' . a:name . '=/usr/share/dict/words,/and/there'
call assert_equal('/usr/share/dict/words,/and/there', &dictionary) call assert_equal('/usr/share/dict/words,/and/there', eval('&' . a:name))
set dictionary=/usr/share/dict\ words exe 'set ' . a:name . '=/usr/share/dict\ words'
call assert_equal('/usr/share/dict words', &dictionary) call assert_equal('/usr/share/dict words', eval('&' . a:name))
" Check rejecting weird characters. " Check rejecting weird characters.
call assert_fails("set dictionary=/not&there", "E474:") call assert_fails("set " . a:name . "=/not&there", "E474:")
call assert_fails("set dictionary=/not>there", "E474:") call assert_fails("set " . a:name . "=/not>there", "E474:")
call assert_fails("set dictionary=/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 endfunc

View File

@ -848,7 +848,7 @@ static const int included_patches[] = {
// 107 NA // 107 NA
// 106, // 106,
// 105 NA // 105 NA
// 104, 104,
// 103 NA // 103 NA
102, 102,
101, 101,