patch 9.1.1613: tests: test_search leaves a few swapfiles behind

Commit: 
https://github.com/vim/vim/commit/a2bb21a895ce518baf36416737cc77e9db3b85af
Author: Christian Brabandt <c...@256bit.org>
Date:   Sat Aug 9 23:49:47 2025 +0200

    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: #17933
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 65b55999e..f04e01d9d 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -1623,7 +1623,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
@@ -1836,7 +1836,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
@@ -1852,7 +1852,7 @@ func Test_searchforward_var()
   let v:searchforward = 1
   normal N
   call assert_equal(1, line('.'))
-  close!
+  bw!
 endfunc
 
 " Test for invalid regular expressions
@@ -1913,7 +1913,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'
@@ -1941,7 +1941,7 @@ func Test_search_smartcase()
   call assert_equal([2, 4], [line('.'), col('.')])
 
   set ignorecase& smartcase&
-  close!
+  bw!
 endfun
 
 " Test 'smartcase' with utf-8.
@@ -2039,7 +2039,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 %
@@ -2065,7 +2065,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
@@ -2078,7 +2078,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()
diff --git a/src/version.c b/src/version.c
index 68f1ff294..9cef88b6d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1613,
 /**/
     1612,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1ukrbn-005CXq-0i%40256bit.org.

Raspunde prin e-mail lui