diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-26 17:24:34 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-26 17:24:34 +0100 |
commit | a2b3e7dc9201fb3d8782c6b4ab53862160e254da (patch) | |
tree | 4a1c0957ed635705f46d65cc87147ac05d79d741 /src/testdir/test_startup.vim | |
parent | 0a1a6a1aa4004d0e4d64cc375540156b8bd92a87 (diff) |
patch 8.2.2656: some command line arguments and regexp errors not testedv8.2.2656
Problem: Some command line arguments and regexp errors not tested.
Solution: Add a few test cases. (Dominique Pellé, closes #8013)
Diffstat (limited to 'src/testdir/test_startup.vim')
-rw-r--r-- | src/testdir/test_startup.vim | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim index 0817c9e576..323b019c1c 100644 --- a/src/testdir/test_startup.vim +++ b/src/testdir/test_startup.vim @@ -860,10 +860,12 @@ func Test_t_arg() \ '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 @@ func Test_w_arg() " 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 |