From 61aab4cfe066edac6fc70bb749c763dacf2ef988 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 2 Oct 2025 07:55:44 +0800 Subject: [PATCH] vim-patch:9.1.0698: tests: "Untitled" file not removed when running Test_crash1_3 alone Problem: tests: "Untitled" file not removed when running Test_crash1_3 alone with TEST_FILTER (after v9.1.0695) Solution: Use a TearDown function instead of another test. (zeertzjq) closes: vim/vim#15578 closes: vim/vim#15577 https://github.com/vim/vim/commit/d56c451e1c05310562c5282352d7bb287c16323c (cherry picked from commit 532cc88604c66d8dea8b30a03bcf4db01fff392c) --- test/old/testdir/test_crash.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/old/testdir/test_crash.vim b/test/old/testdir/test_crash.vim index 900bb9e40b..5ddbd07b55 100644 --- a/test/old/testdir/test_crash.vim +++ b/test/old/testdir/test_crash.vim @@ -224,9 +224,9 @@ func Test_crash2() exe buf .. "bw!" endfunc -func Test_zz_cleanup() - " That file is created at Test_crash1_2() by dialog_changed_uaf - " but cleanup in that Test, doesn't remove it. Let's try again at +func TearDown() + " That file is created at Test_crash1_3() by dialog_changed_uaf + " but cleaning up in that test doesn't remove it. Let's try again at " the end of this test script call delete('Untitled') endfunc