comparison src/testdir/runtest.vim @ 31353:49bd0e97549d v9.0.1010

patch 9.0.1010: stray warnings for existing swap files Commit: https://github.com/vim/vim/commit/23526d2539e8679ea8df14e3a018101dedc3f391 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Dec 5 15:50:41 2022 +0000 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.
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Dec 2022 17:00:05 +0100
parents 56a2af8c0980
children 7fe2e5f8be42
comparison
equal deleted inserted replaced
31352:8685c826da45 31353:49bd0e97549d
361 let message ..= s:t_normal 361 let message ..= s:t_normal
362 endif 362 endif
363 endif 363 endif
364 call add(s:messages, message) 364 call add(s:messages, message)
365 let s:done += 1 365 let s:done += 1
366
367 " May be editing some buffer, wipe it out. Then we may end up in another
368 " buffer, continue until we end up in an empty no-name buffer without a swap
369 " file.
370 while bufname() != '' || execute('swapname') !~ 'No swap file'
371 bwipe!
372 endwhile
366 373
367 " Check if the test has left any swap files behind. Delete them before 374 " Check if the test has left any swap files behind. Delete them before
368 " running tests again, they might interfere. 375 " running tests again, they might interfere.
369 let swapfiles = s:GetSwapFileList() 376 let swapfiles = s:GetSwapFileList()
370 if len(swapfiles) > 0 377 if len(swapfiles) > 0