neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit cd4c7850d05f64ae5a9d0bfd37ce3bd09e8fe9f1
parent 6ce964aed6aa58d1f30c1181411d6cb1a9777ab8
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Sat, 28 Feb 2026 07:04:53 +0800

vim-patch:9.2.0070: tests: various tests leave swapfiles around

Problem:  tests: various tests leave swapfiles around
Solution: close open buffers using :bw! instead of :close!

https://github.com/vim/vim/commit/2fa34b64228cc385cc9705919edb169ab19e68bc

Co-authored-by: Christian Brabandt <cb@256bit.org>

Diffstat:
Mtest/old/testdir/test_ex_mode.vim | 8++++----
Mtest/old/testdir/test_global.vim | 2+-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/test/old/testdir/test_ex_mode.vim b/test/old/testdir/test_ex_mode.vim @@ -113,7 +113,7 @@ func Test_Ex_emptybuf() call setline(1, "abc") call assert_fails('call feedkeys("Q\<CR>", "xt")', 'E501:') call assert_fails('call feedkeys("Q%d\<CR>", "xt")', 'E749:') - close! + bw! endfunc " Test for the :open command @@ -126,7 +126,7 @@ func Test_open_command() call feedkeys("Qopen /bar/\<CR>", 'xt') call assert_equal(5, col('.')) call assert_fails('call feedkeys("Qopen /baz/\<CR>", "xt")', 'E479:') - close! + bw! endfunc func Test_open_command_flush_line() @@ -246,12 +246,12 @@ func Test_Ex_append() call setline(1, "\t abc") call feedkeys("Qappend!\npqr\nxyz\n.\nvisual\n", 'xt') call assert_equal(["\t abc", "\t pqr", "\t xyz"], getline(1, '$')) - close! + bw! new call feedkeys("Qappend\na\\\n.", 'xt') call assert_equal(['a\'], getline(1, '$')) - close! + bw! endfunc func Test_ex_mode_errors() diff --git a/test/old/testdir/test_global.vim b/test/old/testdir/test_global.vim @@ -69,7 +69,7 @@ func Test_global_print() v/foo\|bar/p call assert_notequal('', v:statusmsg) - close! + bw! endfunc func Test_global_empty_pattern()