neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 9e8d551b1eef9f6f8109eee8b10a9f38aada4e25
parent 1eca030fb2dd53d99608db744a511a182c6a2347
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Sun, 10 Aug 2025 08:25:06 +0800

vim-patch:9.1.1613: tests: test_search leaves a few swapfiles behind

Problem:  tests: test_search leaves a few swapfiles behind
Solution: Use :bw! instead of :close to close the swapfile at the end of
          the test.

related: vim/vim#17933

https://github.com/vim/vim/commit/a2bb21a895ce518baf36416737cc77e9db3b85af

Co-authored-by: Christian Brabandt <cb@256bit.org>

Diffstat:
Mtest/old/testdir/test_search.vim | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/test/old/testdir/test_search.vim b/test/old/testdir/test_search.vim @@ -1565,7 +1565,7 @@ func Test_search_match_at_curpos() call search('.', 'c') call assert_equal([3, 5], [line('.'), col('.')]) - close! + bw! endfunc " Test for error cases with the search() function @@ -1741,7 +1741,7 @@ func Test_search_pat_not_found() call assert_fails('normal n', 'E385:') call assert_fails('normal N', 'E384:') set wrapscan& - close + bw endfunc " Test for v:searchforward variable @@ -1757,7 +1757,7 @@ func Test_searchforward_var() let v:searchforward = 1 normal N call assert_equal(1, line('.')) - close! + bw! endfunc " Test for invalid regular expressions @@ -1818,7 +1818,7 @@ func Test_search_in_visual_area() call assert_equal([2, 5], [line('.'), col('.')]) exe "normal 2GVj$?\\%Vbar\<CR>\<Esc>" call assert_equal([3, 5], [line('.'), col('.')]) - close! + bw! endfunc " Test for searching with 'smartcase' and 'ignorecase' @@ -1846,7 +1846,7 @@ func Test_search_smartcase() call assert_equal([2, 4], [line('.'), col('.')]) set ignorecase& smartcase& - close! + bw! endfun " Test 'smartcase' with utf-8. @@ -1944,7 +1944,7 @@ func Test_search_offset() exe "normal /four/e+1\<CR>" call assert_equal([2, 10], [line('.'), col('.')]) - close! + bw! endfunc " Test for searching for matching parenthesis using % @@ -1970,7 +1970,7 @@ func Test_search_match_paren() normal 20|% call assert_equal(4, col('.')) set virtualedit& - close! + bw! endfunc " Test for searching a pattern and stopping before a specified line @@ -1983,7 +1983,7 @@ func Test_search_stopline() call cursor(4, 1) call assert_equal(0, search('vim', 'bn', 2)) call assert_equal(1, search('vim', 'bn', 1)) - close! + bw! endfunc func Test_incsearch_highlighting_newline()