aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2021-05-12 14:19:43 +0900
committerShougo Matsushita <Shougo.Matsu@gmail.com>2021-11-19 13:45:29 +0900
commit133d79a3584edfd1fa546ebe823580e3caac6c87 (patch)
tree5bb336795bf8ae5d18a90dfd01eaccb1ddf45839 /src
parentf71be1f87b40bf863b6cf6b4fbcebffdd3297d88 (diff)
downloadrneovim-133d79a3584edfd1fa546ebe823580e3caac6c87.tar.gz
rneovim-133d79a3584edfd1fa546ebe823580e3caac6c87.tar.bz2
rneovim-133d79a3584edfd1fa546ebe823580e3caac6c87.zip
vim-patch:8.2.3616: arglist test does not clear the argument list consistently
Problem: Arglist test does not clear the argument list consistently. Solution: Call Reset_arglist(). (Shougo Matsushita, closes vim/vim#9154) https://github.com/vim/vim/commit/3cad47038547e694cfa26ba39c399f610d2054bd
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_arglist.vim18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/nvim/testdir/test_arglist.vim b/src/nvim/testdir/test_arglist.vim
index 8fd60d6a5a..9f1e6ef044 100644
--- a/src/nvim/testdir/test_arglist.vim
+++ b/src/nvim/testdir/test_arglist.vim
@@ -1,5 +1,10 @@
" Test argument list commands
+func Reset_arglist()
+ cd
+ args a | %argd
+endfunc
+
func Test_argidx()
args a b c
last
@@ -26,6 +31,8 @@ func Test_argidx()
endfunc
func Test_argadd()
+ call Reset_arglist()
+
%argdelete
argadd a b c
call assert_equal(0, argidx())
@@ -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())