forked from aniani/vim
patch 8.2.2368: insufficient tests for setting options
Problem: Insufficient tests for setting options. Solution: Add a few tests. (Dominique Pellé, closes #7695)
This commit is contained in:
parent
239f8d9326
commit
85773bf32b
@ -371,8 +371,14 @@ func Test_set_errors()
|
|||||||
call assert_fails('set foldmarker=x', 'E536:')
|
call assert_fails('set foldmarker=x', 'E536:')
|
||||||
call assert_fails('set commentstring=x', 'E537:')
|
call assert_fails('set commentstring=x', 'E537:')
|
||||||
call assert_fails('set complete=x', 'E539:')
|
call assert_fails('set complete=x', 'E539:')
|
||||||
|
call assert_fails('set rulerformat=%-', 'E539:')
|
||||||
|
call assert_fails('set rulerformat=%(', 'E542:')
|
||||||
|
call assert_fails('set rulerformat=%15(%%', 'E542:')
|
||||||
|
call assert_fails('set statusline=%$', 'E539:')
|
||||||
call assert_fails('set statusline=%{', 'E540:')
|
call assert_fails('set statusline=%{', 'E540:')
|
||||||
call assert_fails('set statusline=%(', 'E542:')
|
call assert_fails('set statusline=%(', 'E542:')
|
||||||
|
call assert_fails('set statusline=%)', 'E542:')
|
||||||
|
|
||||||
if has('cursorshape')
|
if has('cursorshape')
|
||||||
" This invalid value for 'guicursor' used to cause Vim to crash.
|
" This invalid value for 'guicursor' used to cause Vim to crash.
|
||||||
call assert_fails('set guicursor=i-ci,r-cr:h', 'E545:')
|
call assert_fails('set guicursor=i-ci,r-cr:h', 'E545:')
|
||||||
@ -406,11 +412,22 @@ func Test_set_errors()
|
|||||||
call assert_fails('set wildchar=<abc>', 'E474:')
|
call assert_fails('set wildchar=<abc>', 'E474:')
|
||||||
call assert_fails('set cmdheight=1a', 'E521:')
|
call assert_fails('set cmdheight=1a', 'E521:')
|
||||||
call assert_fails('set invcmdheight', 'E474:')
|
call assert_fails('set invcmdheight', 'E474:')
|
||||||
if has('python') && has('python3')
|
if has('python') || has('python3')
|
||||||
call assert_fails('set pyxversion=6', 'E474:')
|
call assert_fails('set pyxversion=6', 'E474:')
|
||||||
endif
|
endif
|
||||||
call assert_fails("let &tabstop='ab'", 'E521:')
|
call assert_fails("let &tabstop='ab'", 'E521:')
|
||||||
call assert_fails('set spellcapcheck=%\\(', 'E54:')
|
call assert_fails('set spellcapcheck=%\\(', 'E54:')
|
||||||
|
call assert_fails('set sessionoptions=curdir,sesdir', 'E474:')
|
||||||
|
call assert_fails('set foldmarker={{{,', 'E474:')
|
||||||
|
call assert_fails('set sessionoptions=sesdir,curdir', 'E474:')
|
||||||
|
call assert_fails('set listchars=trail:· ambiwidth=double', 'E834:')
|
||||||
|
set listchars&
|
||||||
|
call assert_fails('set fillchars=stl:· ambiwidth=double', 'E835:')
|
||||||
|
set fillchars&
|
||||||
|
call assert_fails('set fileencoding=latin1,utf-8', 'E474:')
|
||||||
|
set nomodifiable
|
||||||
|
call assert_fails('set fileencoding=latin1', 'E21:')
|
||||||
|
set modifiable&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func CheckWasSet(name)
|
func CheckWasSet(name)
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2368,
|
||||||
/**/
|
/**/
|
||||||
2367,
|
2367,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user