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)
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 0817c9e..323b019 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -860,10 +860,12 @@
\ 'Xtags')
call writefile([' first', ' second', ' third'], 'Xfile1')
- if RunVim(before, after, '-t second')
- call assert_equal(['Xfile1:L2C5'], readfile('Xtestout'))
- call delete('Xtestout')
- endif
+ for t_arg in ['-t second', '-tsecond']
+ if RunVim(before, after, '-t second')
+ call assert_equal(['Xfile1:L2C5'], readfile('Xtestout'), t_arg)
+ call delete('Xtestout')
+ endif
+ endfor
call delete('Xtags')
call delete('Xfile1')
@@ -1064,10 +1066,12 @@
" A number argument sets the 'window' option
call writefile(["iwindow \<C-R>=&window\<CR>\<Esc>:wq! Xresult\<CR>"], 'Xscriptin', 'b')
- if RunVim([], [], '-s Xscriptin -w 17')
- call assert_equal(["window 17"], readfile('Xresult'))
- call delete('Xresult')
- endif
+ for w_arg in ['-w 17', '-w17']
+ if RunVim([], [], '-s Xscriptin ' .. w_arg)
+ call assert_equal(["window 17"], readfile('Xresult'), w_arg)
+ call delete('Xresult')
+ endif
+ endfor
call delete('Xscriptin')
endfunc