From 7452a8a568926a60b5b7038b6a4a49c4e29893c1 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 3 Dec 2025 08:59:54 +0800 Subject: [PATCH 1/2] vim-patch:9.1.1941: tests: Test_execute_register() leaves swapfile behind Problem: tests: Test_execute_register() leaves swapfile behind Solution: Use :bw instead of :close to close the buffer completely https://github.com/vim/vim/commit/791478b30ae48f14e297b4f79dc49380ace99fac Co-authored-by: Christian Brabandt --- test/old/testdir/test_registers.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/old/testdir/test_registers.vim b/test/old/testdir/test_registers.vim index b00baa8c65..51b332c220 100644 --- a/test/old/testdir/test_registers.vim +++ b/test/old/testdir/test_registers.vim @@ -561,7 +561,7 @@ func Test_execute_register() new call feedkeys("@=\ax\y", 'xt') call assert_equal(['x', 'y'], getline(1, '$')) - close! + bw! " cannot execute a register in operator pending mode call assert_beeps('normal! c@r') From c3c8a18af789ec0650a5f6a45e9507fd4da7c5b4 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 3 Dec 2025 09:00:34 +0800 Subject: [PATCH 2/2] vim-patch:9.1.1945: tests: Test_getbufwintabinfo() leaves swapfiles behind Problem: tests: Test_getbufwintabinfo() leaves swapfiles behind Solution: Close all open buffers using %bw! https://github.com/vim/vim/commit/397ad21268904d977ffe86db684a5d460daba8ed Co-authored-by: Christian Brabandt --- test/old/testdir/test_bufwintabinfo.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/test/old/testdir/test_bufwintabinfo.vim b/test/old/testdir/test_bufwintabinfo.vim index 0a4bd0b674..225c98c530 100644 --- a/test/old/testdir/test_bufwintabinfo.vim +++ b/test/old/testdir/test_bufwintabinfo.vim @@ -112,6 +112,7 @@ func Test_getbufwintabinfo() call assert_true(winlist[2].quickfix) call assert_false(winlist[2].loclist) wincmd t | only + %bw! endfunc function Test_get_wininfo_leftcol()