Mercurial > vim
diff src/testdir/test_startup.vim @ 24230:ed0fc4787392 v8.2.2656
patch 8.2.2656: some command line arguments and regexp errors not tested
Commit: https://github.com/vim/vim/commit/a2b3e7dc9201fb3d8782c6b4ab53862160e254da
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 26 17:24:34 2021 +0100
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 https://github.com/vim/vim/issues/8013)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 26 Mar 2021 17:30:03 +0100 |
parents | 1e85e76f9e76 |
children | d3cabf12c991 |
line wrap: on
line diff
--- 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