patch 9.2.0342: tests: test_excmd.vim leaves swapfiles behind

Commit: 
https://github.com/vim/vim/commit/c922202ea20a8c379a6c6c6c201af4bf5e861df7
Author: Christian Brabandt <[email protected]>
Date:   Tue Apr 14 16:10:43 2026 +0000

    patch 9.2.0342: tests: test_excmd.vim leaves swapfiles behind
    
    Problem:  tests: test_excmd.vim leaves swapfiles behind
    Solution: Close open buffer using :bw!
    
    related: #19975
    
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/src/testdir/test_excmd.vim b/src/testdir/test_excmd.vim
index cc877ce8b..0de0771f7 100644
--- a/src/testdir/test_excmd.vim
+++ b/src/testdir/test_excmd.vim
@@ -61,7 +61,7 @@ func Test_copy()
   exe "normal! gg4:yank\<CR>"
   call assert_equal("L1
L2
L1
L2
", @")
 
-  close!
+  bw!
 endfunc
 
 " Test for the :file command
@@ -105,7 +105,7 @@ func Test_drop_cmd()
   call assert_equal(1, winnr('$'))
   " Check for setting the argument list
   call assert_equal(['Xdropfile'], argv())
-  enew | only!
+  enew | only! | bw! Xdropfile
 endfunc
 
 " Test for the :append command
@@ -133,7 +133,7 @@ func Test_append_cmd()
   call assert_equal(['  L1', '  L2', '  L3'], getline(1, '$'))
   call assert_true(&autoindent)
   set autoindent&
-  close!
+  bw!
 endfunc
 
 func Test_append_cmd_empty_buf()
@@ -181,7 +181,7 @@ func Test_insert_cmd()
   call assert_equal(['  L2', '  L3', '  L1'], getline(1, '$'))
   call assert_true(&autoindent)
   set autoindent&
-  close!
+  bw!
 endfunc
 
 func Test_insert_cmd_empty_buf()
@@ -229,7 +229,7 @@ func Test_change_cmd()
   call assert_equal(['  L4', '  L5', 'L2', 'L3'], getline(1, '$'))
   call assert_true(&autoindent)
   set autoindent&
-  close!
+  bw!
 endfunc
 
 " Test for the :language command
@@ -537,14 +537,14 @@ func Test_read_cmd()
   edit Xcmdfile
   read
   call assert_equal(['one', 'one'], getline(1, '$'))
-  close!
+  bw!
   new
   read Xcmdfile
   call assert_equal(['', 'one'], getline(1, '$'))
   call deletebufline('', 1, '$')
   call feedkeys("Qr Xcmdfile\<CR>visual\<CR>", 'xt')
   call assert_equal(['one'], getline(1, '$'))
-  close!
+  bw!
 endfunc
 
 " Test for running Ex commands when text is locked.
@@ -611,7 +611,7 @@ func Test_excmd_delete()
   call assert_equal(['        bar'], split(execute('deletp'), "
"))
   call setline(1, ['foo', "    bar"])
   call assert_equal(['        bar'], split(execute('deletep'), "
"))
-  close!
+  bw!
 endfunc
 
 " Test for commands that are blocked in a sandbox
diff --git a/src/version.c b/src/version.c
index ff43fbef0..a2c470932 100644
--- a/src/version.c
+++ b/src/version.c
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    342,
 /**/
     341,
 /**/

-- 
-- 
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/E1wCgPq-002UFZ-Ty%40256bit.org.

Raspunde prin e-mail lui