aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/old/testdir/runtest.vim7
-rw-r--r--test/old/testdir/test_autocmd.vim2
2 files changed, 8 insertions, 1 deletions
diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim
index 6d8213d27c..5fda5bb440 100644
--- a/test/old/testdir/runtest.vim
+++ b/test/old/testdir/runtest.vim
@@ -319,6 +319,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()
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim
index f91792e36e..decfec4763 100644
--- a/test/old/testdir/test_autocmd.vim
+++ b/test/old/testdir/test_autocmd.vim
@@ -3156,7 +3156,7 @@ func Test_autocmd_FileReadCmd()
\ 'v:cmdarg = ++ff=mac',
\ 'v:cmdarg = ++enc=utf-8'], getline(1, '$'))
- close!
+ bwipe!
augroup FileReadCmdTest
au!
augroup END