summaryrefslogtreecommitdiffstats
path: root/src/testdir/runtest.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-05 15:50:41 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-05 15:50:41 +0000
commit23526d2539e8679ea8df14e3a018101dedc3f391 (patch)
treef69bf382a5d0a5087da5efdefa87506eb61157b6 /src/testdir/runtest.vim
parent72b5b0d51aa9ddf8d338a5a133a667a3c2392ae1 (diff)
patch 9.0.1010: stray warnings for existing swap filesv9.0.1010
Problem: Stray warnings for existing swap files. Solution: Wipe out the buffer until it has no name and no swap file.
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r--src/testdir/runtest.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim
index 2eabb1a9cb..6c42616c5f 100644
--- a/src/testdir/runtest.vim
+++ b/src/testdir/runtest.vim
@@ -364,6 +364,13 @@ func RunTheTest(test)
call add(s:messages, message)
let s:done += 1
+ " May be editing some buffer, wipe it out. Then we may end up in another
+ " buffer, continue until we end up in an empty no-name buffer without a swap
+ " file.
+ while bufname() != '' || execute('swapname') !~ 'No swap file'
+ bwipe!
+ endwhile
+
" Check if the test has left any swap files behind. Delete them before
" running tests again, they might interfere.
let swapfiles = s:GetSwapFileList()