summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShougo Matsushita <Shougo.Matsu@gmail.com>2021-11-18 15:37:29 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-18 15:37:29 +0000
commit3cad47038547e694cfa26ba39c399f610d2054bd (patch)
tree5dd99ae643ffb52869ed55ae4a5b04c5257fc393
parent818ff25cd1aabf60b9cd239da2f1328a959954f7 (diff)
downloadvim-git-3cad47038547e694cfa26ba39c399f610d2054bd.tar.gz
patch 8.2.3616: arglist test does not clear the argument list consistentlyv8.2.3616
Problem: Arglist test does not clear the argument list consistently. Solution: Call Reset_arglist(). (Shougo Matsushita, closes #9154)
-rw-r--r--src/testdir/test_arglist.vim19
-rw-r--r--src/version.c2
2 files changed, 11 insertions, 10 deletions
diff --git a/src/testdir/test_arglist.vim b/src/testdir/test_arglist.vim
index 7474d335a..b1f292975 100644
--- a/src/testdir/test_arglist.vim
+++ b/src/testdir/test_arglist.vim
@@ -4,6 +4,10 @@ source check.vim
source shared.vim
source term_util.vim
+func Reset_arglist()
+ args a | %argd
+endfunc
+
func Test_argidx()
args a b c
last
@@ -30,6 +34,8 @@ func Test_argidx()
endfunc
func Test_argadd()
+ call Reset_arglist()
+
%argdelete
argadd a b c
call assert_equal(0, argidx())
@@ -124,8 +130,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
@@ -217,8 +222,7 @@ func Test_argument()
endfunc
func Test_list_arguments()
- " Clean the argument list
- arga a | %argd
+ call Reset_arglist()
" four args half the screen width makes two lines with two columns
let aarg = repeat('a', &columns / 2 - 4)
@@ -256,8 +260,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
@@ -284,10 +287,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()
diff --git a/src/version.c b/src/version.c
index b6299b896..ea1644d91 100644
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 3616,
+/**/
3615,
/**/
3614,