Commit: patch 9.2.0982: tests: test_substitute leaves swapfiles behind

Christian Brabandt <[email protected]>
Newsgroups gmane.editors.vim.devel
Message-ID <[email protected]>
patch 9.2.0982: tests: test_substitute leaves swapfiles behind

Commit: https://github.com/vim/vim/commit/be66c98572f6d1d9bfab63e318c48aa3c7bd38a6
Author: Christian Brabandt <[email protected]>
Date:   Wed Aug 19 20:28:07 2026 +0000

    patch 9.2.0982: tests: test_substitute leaves swapfiles behind
    
    Problem:  tests: test_substitute leaves swapfiles behind
    Solution: Close open buffer using :bw!
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_substitute.vim b/src/testdir/test_substitute.vim
index eb60513bd..0fefcbcad 100644
--- a/src/testdir/test_substitute.vim
+++ b/src/testdir/test_substitute.vim
@@ -797,7 +797,7 @@ func Test_replace_with_tilde()
   call assert_equal('- Bug uuun "vPPPP" on this text:', getline(1))
   s/o/~~~/
   call assert_equal('- Bug uuun "vPPPP" uuuuuuuuun this text:', getline(1))
-  close!
+  bw!
 endfunc
 
 func Test_replace_keeppatterns()
@@ -835,7 +835,7 @@ one two
   exe "normal 0dn"
   call assert_equal('xyz bar', getline('.'))
 
-  close!
+  bw!
 endfunc
 
 func Test_sub_beyond_end()
@@ -859,7 +859,7 @@ func Test_repeat_last_sub()
   let @/ = 'green'
   s//gray
   call assert_equal('red gray red orange red', getline(1))
-  close!
+  bw!
 endfunc
 
 " Test for Vi compatible substitution:
@@ -874,7 +874,7 @@ func Test_sub_vi_compatibility()
   let @/ = 'white'
   s\&green&
   call assert_equal('amber green yellow white green', getline(1))
-  close!
+  bw!
 
   call assert_fails('vim9cmd s\/white/', 'E1270:')
   call assert_fails('vim9cmd s\?white?', 'E1270:')
@@ -887,7 +887,7 @@ func Test_sub_expand_text()
   call setline(1, 'abcabcabcabcabcabcabcabc')
   s/b/\=repeat('B', 10)/g
   call assert_equal(repeat('aBBBBBBBBBBc', 8), getline(1))
-  close!
+  bw!
 endfunc
 
 " Test for command failures when the last substitute pattern is not set.
@@ -998,7 +998,7 @@ func Test_substitute_multiline_submatch()
   call setline(1, ['line1', 'line2', 'line3', 'line4'])
   %s/^line1\(\_.\+\)line4$/\=submatch(1)/
   call assert_equal(['', 'line2', 'line3', ''], getline(1, '$'))
-  close!
+  bw!
 endfunc
 
 func Test_substitute_skipped_range()
diff --git a/src/version.c b/src/version.c
index b0a5d0718..28805352f 100644
--- a/src/version.c
+++ b/src/version.c
@@ -763,6 +763,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    982,
 /**/
     981,
 /**/

-- 
-- 
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1wwmvF-00CPKP-VP%40256bit.org.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.