mirror of
https://github.com/vim/vim.git
synced 2025-10-03 05:14:07 -04:00
patch 8.2.2656: some command line arguments and regexp errors not tested
Problem: Some command line arguments and regexp errors not tested. Solution: Add a few test cases. (Dominique Pellé, closes #8013)
This commit is contained in:
@@ -924,8 +924,17 @@ func Test_regexp_error()
|
|||||||
call assert_fails("call matchlist('x x', '\\%#=1 \\ze*')", 'E888:')
|
call assert_fails("call matchlist('x x', '\\%#=1 \\ze*')", 'E888:')
|
||||||
call assert_fails("call matchlist('x x', '\\%#=2 \\zs*')", 'E888:')
|
call assert_fails("call matchlist('x x', '\\%#=2 \\zs*')", 'E888:')
|
||||||
call assert_fails("call matchlist('x x', '\\%#=2 \\ze*')", 'E888:')
|
call assert_fails("call matchlist('x x', '\\%#=2 \\ze*')", 'E888:')
|
||||||
call assert_fails('exe "normal /\\%#=1\\%[x\\%[x]]\<CR>"', 'E369:')
|
|
||||||
call assert_fails("call matchstr('abcd', '\\%o841\\%o142')", 'E678:')
|
call assert_fails("call matchstr('abcd', '\\%o841\\%o142')", 'E678:')
|
||||||
|
call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647c')", 'E951:')
|
||||||
|
call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647l')", 'E951:')
|
||||||
|
call assert_fails("call matchstr('abcd', '\\%#=2\\%2147483647v')", 'E951:')
|
||||||
|
call assert_fails('exe "normal /\\%#=1\\%[x\\%[x]]\<CR>"', 'E369:')
|
||||||
|
call assert_fails('exe "normal /\\%#=2\\%2147483647l\<CR>"', 'E951:')
|
||||||
|
call assert_fails('exe "normal /\\%#=2\\%2147483647c\<CR>"', 'E951:')
|
||||||
|
call assert_fails('exe "normal /\\%#=2\\%102261126v\<CR>"', 'E951:')
|
||||||
|
call assert_fails('exe "normal /\\%#=2\\%2147483646l\<CR>"', 'E486:')
|
||||||
|
call assert_fails('exe "normal /\\%#=2\\%2147483646c\<CR>"', 'E486:')
|
||||||
|
call assert_fails('exe "normal /\\%#=2\\%102261125v\<CR>"', 'E486:')
|
||||||
call assert_equal('', matchstr('abcd', '\%o181\%o142'))
|
call assert_equal('', matchstr('abcd', '\%o181\%o142'))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -860,10 +860,12 @@ func Test_t_arg()
|
|||||||
\ 'Xtags')
|
\ 'Xtags')
|
||||||
call writefile([' first', ' second', ' third'], 'Xfile1')
|
call writefile([' first', ' second', ' third'], 'Xfile1')
|
||||||
|
|
||||||
if RunVim(before, after, '-t second')
|
for t_arg in ['-t second', '-tsecond']
|
||||||
call assert_equal(['Xfile1:L2C5'], readfile('Xtestout'))
|
if RunVim(before, after, '-t second')
|
||||||
call delete('Xtestout')
|
call assert_equal(['Xfile1:L2C5'], readfile('Xtestout'), t_arg)
|
||||||
endif
|
call delete('Xtestout')
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
|
|
||||||
call delete('Xtags')
|
call delete('Xtags')
|
||||||
call delete('Xfile1')
|
call delete('Xfile1')
|
||||||
@@ -1064,10 +1066,12 @@ func Test_w_arg()
|
|||||||
|
|
||||||
" A number argument sets the 'window' option
|
" A number argument sets the 'window' option
|
||||||
call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b')
|
call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b')
|
||||||
if RunVim([], [], '-s Xscriptin -w 17')
|
for w_arg in ['-w 17', '-w17']
|
||||||
call assert_equal(["window 17"], readfile('Xresult'))
|
if RunVim([], [], '-s Xscriptin ' .. w_arg)
|
||||||
call delete('Xresult')
|
call assert_equal(["window 17"], readfile('Xresult'), w_arg)
|
||||||
endif
|
call delete('Xresult')
|
||||||
|
endif
|
||||||
|
endfor
|
||||||
call delete('Xscriptin')
|
call delete('Xscriptin')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
@@ -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 */
|
||||||
|
/**/
|
||||||
|
2656,
|
||||||
/**/
|
/**/
|
||||||
2655,
|
2655,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user