0
0
mirror of https://github.com/vim/vim.git synced 2025-09-28 04:24:06 -04:00

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 #9154)
This commit is contained in:
Shougo Matsushita
2021-11-18 15:37:29 +00:00
committed by Bram Moolenaar
parent 818ff25cd1
commit 3cad470385
2 changed files with 11 additions and 10 deletions

View File

@@ -4,6 +4,10 @@ source check.vim
source shared.vim source shared.vim
source term_util.vim source term_util.vim
func Reset_arglist()
args a | %argd
endfunc
func Test_argidx() func Test_argidx()
args a b c args a b c
last last
@@ -30,6 +34,8 @@ func Test_argidx()
endfunc endfunc
func Test_argadd() func Test_argadd()
call Reset_arglist()
%argdelete %argdelete
argadd a b c argadd a b c
call assert_equal(0, argidx()) call assert_equal(0, argidx())
@@ -124,8 +130,7 @@ endfunc
" Test for [count]argument and [count]argdelete commands " Test for [count]argument and [count]argdelete commands
" Ported from the test_argument_count.in test script " Ported from the test_argument_count.in test script
func Test_argument() func Test_argument()
" Clean the argument list call Reset_arglist()
arga a | %argd
let save_hidden = &hidden let save_hidden = &hidden
set hidden set hidden
@@ -217,8 +222,7 @@ func Test_argument()
endfunc endfunc
func Test_list_arguments() func Test_list_arguments()
" Clean the argument list call Reset_arglist()
arga a | %argd
" four args half the screen width makes two lines with two columns " four args half the screen width makes two lines with two columns
let aarg = repeat('a', &columns / 2 - 4) let aarg = repeat('a', &columns / 2 - 4)
@@ -256,8 +260,7 @@ endfunc
" Test for 0argadd and 0argedit " Test for 0argadd and 0argedit
" Ported from the test_argument_0count.in test script " Ported from the test_argument_0count.in test script
func Test_zero_argadd() func Test_zero_argadd()
" Clean the argument list call Reset_arglist()
arga a | %argd
arga a b c d arga a b c d
2argu 2argu
@@ -284,10 +287,6 @@ func Test_zero_argadd()
call assert_equal('file with spaces', expand('%')) call assert_equal('file with spaces', expand('%'))
endfunc endfunc
func Reset_arglist()
args a | %argd
endfunc
" Test for argc() " Test for argc()
func Test_argc() func Test_argc()
call Reset_arglist() call Reset_arglist()

View File

@@ -757,6 +757,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
3616,
/**/ /**/
3615, 3615,
/**/ /**/