Commit: patch 9.2.0342: tests: test_excmd.vim leaves swapfiles behind

2 views
Skip to first unread message

Christian Brabandt

unread,
Apr 14, 2026, 12:15:15 PMApr 14
to vim...@googlegroups.com
patch 9.2.0342: tests: test_excmd.vim leaves swapfiles behind

Commit: https://github.com/vim/vim/commit/c922202ea20a8c379a6c6c6c201af4bf5e861df7
Author: Christian Brabandt <c...@256bit.org>
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 <c...@256bit.org>

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,
/**/
Reply all
Reply to author
Forward
0 new messages