vim-patch:8.2.1043: %a item in 'statusline' not tested

Problem:    %a item in 'statusline' not tested.
Solution:   Add a test. (Dominique Pellé, closes vim/vim#6318)
4014e2ceb0

Do not run test_statusline.vim in test_alot.vim
because test_statusline.vim runs separately in Vim since patch v8.2.0164.
This commit is contained in:
Jan Edmund Lazo 2021-03-02 00:27:12 -05:00
parent f32acc70e8
commit 1edc0285c4
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15
2 changed files with 14 additions and 3 deletions

View File

@ -37,7 +37,6 @@ source test_recover.vim
source test_scroll_opt.vim source test_scroll_opt.vim
source test_sort.vim source test_sort.vim
source test_sha256.vim source test_sha256.vim
source test_statusline.vim
source test_suspend.vim source test_suspend.vim
source test_syn_attr.vim source test_syn_attr.vim
source test_tabline.vim source test_tabline.vim

View File

@ -1,12 +1,12 @@
" Test 'statusline' " Test 'statusline'
" "
" Not tested yet: " Not tested yet:
" %a
" %N " %N
" %T " %T
" %X " %X
source view_util.vim source view_util.vim
source check.vim
source term_util.vim source term_util.vim
func s:get_statusline() func s:get_statusline()
@ -61,7 +61,19 @@ func Test_statusline_will_be_disabled_with_error()
endfunc endfunc
func Test_statusline() func Test_statusline()
new Xstatusline CheckFeature quickfix
" %a: Argument list ({current} of {max})
set statusline=%a
call assert_match('^\s*$', s:get_statusline())
arglocal a1 a2
rewind
call assert_match('^ (1 of 2)\s*$', s:get_statusline())
next
call assert_match('^ (2 of 2)\s*$', s:get_statusline())
e Xstatusline
call assert_match('^ ((2) of 2)\s*$', s:get_statusline())
only only
set laststatus=2 set laststatus=2
set splitbelow set splitbelow