Skip to content

Commit 4014e2c

Browse files
committed
patch 8.2.1043: %a item in 'statusline' not tested
Problem: %a item in 'statusline' not tested. Solution: Add a test. (Dominique Pellé, closes #6318)
1 parent df069ee commit 4014e2c

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/testdir/test_statusline.vim

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,17 @@ endfunc
6464
func Test_statusline()
6565
CheckFeature quickfix
6666

67-
new Xstatusline
67+
" %a: Argument list ({current} of {max})
68+
set statusline=%a
69+
call assert_match('^\s*$', s:get_statusline())
70+
arglocal a1 a2
71+
rewind
72+
call assert_match('^ (1 of 2)\s*$', s:get_statusline())
73+
next
74+
call assert_match('^ (2 of 2)\s*$', s:get_statusline())
75+
e Xstatusline
76+
call assert_match('^ ((2) of 2)\s*$', s:get_statusline())
77+
6878
only
6979
set laststatus=2
7080
set splitbelow

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1043,
757759
/**/
758760
1042,
759761
/**/

0 commit comments

Comments
 (0)