From d079995fb81bf3d61f7698373442f61476b99fce Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 12 Jul 2022 08:28:56 +0800 Subject: vim-patch:8.2.0270: some code not covered by tests Problem: Some code not covered by tests. Solution: Add test cases. (Yegappan Lakshmanan, closes vim/vim#5649) https://github.com/vim/vim/commit/bc2b71d44a0b90b6aeb3534a76912fccbe5577df --- src/nvim/testdir/test_window_cmd.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/testdir/test_window_cmd.vim') diff --git a/src/nvim/testdir/test_window_cmd.vim b/src/nvim/testdir/test_window_cmd.vim index 21387111a3..731b76c838 100644 --- a/src/nvim/testdir/test_window_cmd.vim +++ b/src/nvim/testdir/test_window_cmd.vim @@ -893,6 +893,15 @@ func Test_window_only() new call assert_fails('only', 'E445:') only! + " Test for :only with a count + let wid = win_getid() + new + new + 3only + call assert_equal(1, winnr('$')) + call assert_equal(wid, win_getid()) + call assert_fails('close', 'E444:') + call assert_fails('%close', 'E16:') endfunc " Test for errors with :wincmd -- cgit