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_sort.vim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/testdir/test_sort.vim') diff --git a/src/nvim/testdir/test_sort.vim b/src/nvim/testdir/test_sort.vim index 540c73a772..8f7642add7 100644 --- a/src/nvim/testdir/test_sort.vim +++ b/src/nvim/testdir/test_sort.vim @@ -1486,6 +1486,8 @@ func Test_sort_last_search_pat() call setline(1, ['3b', '1c', '2a']) sort // call assert_equal(['2a', '3b', '1c'], getline(1, '$')) + call test_clear_search_pat() + call assert_fails('sort //', 'E35:') close! 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_sort.vim | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'src/nvim/testdir/test_sort.vim') diff --git a/src/nvim/testdir/test_sort.vim b/src/nvim/testdir/test_sort.vim index 8f7642add7..9895ad754c 100644 --- a/src/nvim/testdir/test_sort.vim +++ b/src/nvim/testdir/test_sort.vim @@ -1486,11 +1486,25 @@ func Test_sort_last_search_pat() call setline(1, ['3b', '1c', '2a']) sort // call assert_equal(['2a', '3b', '1c'], getline(1, '$')) - call test_clear_search_pat() - call assert_fails('sort //', 'E35:') close! endfunc +" Test for :sort with no last search pattern +func Test_sort_with_no_last_search_pat() + let lines =<< trim [SCRIPT] + call setline(1, ['3b', '1c', '2a']) + call assert_fails('sort //', '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 for retaining marks across a :sort func Test_sort_with_marks() new -- cgit