patch 9.0.1010: stray warnings for existing swap files

Problem:    Stray warnings for existing swap files.
Solution:   Wipe out the buffer until it has no name and no swap file.
diff --git a/src/testdir/test_autocmd.vim b/src/testdir/test_autocmd.vim
index 593e568..2df70b4 100644
--- a/src/testdir/test_autocmd.vim
+++ b/src/testdir/test_autocmd.vim
@@ -578,6 +578,8 @@
   call term_sendkeys(buf, '$')
   call term_sendkeys(buf, ":echo g:scrolled\<CR>")
   call WaitForAssert({-> assert_match('^3 ', term_getline(buf, 6))}, 1000)
+
+  call StopVimInTerminal(buf)
 endfunc
 
 func Test_WinClosed()
@@ -3162,7 +3164,7 @@
         \ 'v:cmdarg =  ++ff=mac',
         \ 'v:cmdarg =  ++enc=utf-8'], getline(1, '$'))
 
-  close!
+  bwipe!
   augroup FileReadCmdTest
     au!
   augroup END