From eea6a4f2a0ad089e0f92dfbc54c92d88c9fea51e Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Jul 2022 10:34:32 +0800 Subject: vim-patch:8.2.{0212,0250} vim-patch:8.2.0212: missing search/substitute pattern hardly tested Problem: Missing search/substitute pattern hardly tested. Solution: Add test_clear_search_pat() and tests. (Yegappan Lakshmanan, closes vim/vim#5579) https://github.com/vim/vim/commit/07ada5ff2fd8f22ed3233ae5c4ddf87c7b3f56fe vim-patch:8.2.0250: test_clear_search_pat() is unused Problem: test_clear_search_pat() is unused. Solution: Remove the function. (Yegappan Lakshmanan, closes vim/vim#5624) https://github.com/vim/vim/commit/4f5776c17cd86f904a7e2f92db297c73e28939b7 --- src/nvim/testdir/test_quickfix.vim | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 4f83c45770..db49242972 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2858,6 +2858,10 @@ func XvimgrepTests(cchar) call assert_equal(0, getbufinfo('Xtestfile1')[0].loaded) call assert_equal([], getbufinfo('Xtestfile2')) + " Test with the last search pattern not set + call test_clear_search_pat() + call assert_fails('Xvimgrep // *', 'E35:') + call delete('Xtestfile1') call delete('Xtestfile2') endfunc -- cgit From 27fd17a79cd2c51e71077bdd896635188ad711b5 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 8 Jul 2022 17:43:05 +0800 Subject: vim-patch:8.2.0243: insufficient code coverage for ex_docmd.c functions Problem: Insufficient code coverage for ex_docmd.c functions. Solution: Add more tests. (Yegappan Lakshmanan, closes vim/vim#5618) https://github.com/vim/vim/commit/9f6277bdde97b7767ded43a0b5a2023eb601b3b7 Cherry-pick Test_window_only() from patch 8.2.0203. Cherry-pick a memory leak fix from patch 8.2.0399. --- src/nvim/testdir/test_quickfix.vim | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/nvim/testdir/test_quickfix.vim') diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index db49242972..9881deaa45 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -2858,10 +2858,6 @@ func XvimgrepTests(cchar) call assert_equal(0, getbufinfo('Xtestfile1')[0].loaded) call assert_equal([], getbufinfo('Xtestfile2')) - " Test with the last search pattern not set - call test_clear_search_pat() - call assert_fails('Xvimgrep // *', 'E35:') - call delete('Xtestfile1') call delete('Xtestfile2') endfunc @@ -2895,6 +2891,21 @@ func Test_vimgrep_incsearch() set noincsearch endfunc +" Test vimgrep with the last search pattern not set +func Test_vimgrep_with_no_last_search_pat() + let lines =<< trim [SCRIPT] + call assert_fails('vimgrep // *', 'E35:') + call writefile(v:errors, 'Xresult') + qall! + [SCRIPT] + call writefile(lines, 'Xscript') + if RunVim([], [], '--clean -S Xscript') + call assert_equal([], readfile('Xresult')) + endif + call delete('Xscript') + call delete('Xresult') +endfunc + " Test vimgrep without swap file func Test_vimgrep_without_swap_file() let lines =<< trim [SCRIPT] -- cgit