diff options
Diffstat (limited to 'src/nvim/testdir/test_arglist.vim')
-rw-r--r-- | src/nvim/testdir/test_arglist.vim | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim index a1ef8325ec..08e578a226 100644 --- a/src/nvim/testdir/test_arglist.vim +++ b/src/nvim/testdir/test_arglist.vim @@ -26,6 +26,8 @@ func Test_argidx() endfunc func Test_argadd() + call Reset_arglist() + %argdelete argadd a b c call assert_equal(0, argidx()) @@ -103,6 +105,11 @@ func Init_abc() next endfunc +func Reset_arglist() + cd + args a | %argd +endfunc + func Assert_argc(l) call assert_equal(len(a:l), argc()) let i = 0 @@ -115,8 +122,7 @@ endfunc " Test for [count]argument and [count]argdelete commands " Ported from the test_argument_count.in test script func Test_argument() - " Clean the argument list - arga a | %argd + call Reset_arglist() let save_hidden = &hidden set hidden @@ -244,8 +250,7 @@ endfunc " Test for 0argadd and 0argedit " Ported from the test_argument_0count.in test script func Test_zero_argadd() - " Clean the argument list - arga a | %argd + call Reset_arglist() arga a b c d 2argu @@ -272,10 +277,6 @@ func Test_zero_argadd() call assert_equal('file with spaces', expand('%')) endfunc -func Reset_arglist() - args a | %argd -endfunc - " Test for argc() func Test_argc() call Reset_arglist() @@ -408,6 +409,7 @@ endfunc " Test for the :argdelete command func Test_argdelete() call Reset_arglist() + args aa a aaa b bb argdelete a* call assert_equal(['b', 'bb'], argv()) |