diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-02 00:27:12 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-03-02 18:19:14 -0500 |
commit | 1edc0285c4e563b61d596fc2f8352010bd91cb38 (patch) | |
tree | f4b493647eaea612ca3e0dca211ae3a2730a6132 /src | |
parent | f32acc70e84a3ea4a61e856e4d723ccc433e687c (diff) | |
download | rneovim-1edc0285c4e563b61d596fc2f8352010bd91cb38.tar.gz rneovim-1edc0285c4e563b61d596fc2f8352010bd91cb38.tar.bz2 rneovim-1edc0285c4e563b61d596fc2f8352010bd91cb38.zip |
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)
https://github.com/vim/vim/commit/4014e2ceb03b8aeb947a0c671a099b677c8f2d5d
Do not run test_statusline.vim in test_alot.vim
because test_statusline.vim runs separately in Vim since patch v8.2.0164.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_alot.vim | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_statusline.vim | 16 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim index 4f056abdc0..daf3c9c110 100644 --- a/src/nvim/testdir/test_alot.vim +++ b/src/nvim/testdir/test_alot.vim @@ -37,7 +37,6 @@ source test_recover.vim source test_scroll_opt.vim source test_sort.vim source test_sha256.vim -source test_statusline.vim source test_suspend.vim source test_syn_attr.vim source test_tabline.vim diff --git a/src/nvim/testdir/test_statusline.vim b/src/nvim/testdir/test_statusline.vim index 4e38f7ebd8..ce2ef4dcd8 100644 --- a/src/nvim/testdir/test_statusline.vim +++ b/src/nvim/testdir/test_statusline.vim @@ -1,12 +1,12 @@ " Test 'statusline' " " Not tested yet: -" %a " %N " %T " %X source view_util.vim +source check.vim source term_util.vim func s:get_statusline() @@ -61,7 +61,19 @@ func Test_statusline_will_be_disabled_with_error() endfunc 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 set laststatus=2 set splitbelow |