mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 20:08:17 +00:00
vim-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.
23526d2539
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -319,6 +319,13 @@ func RunTheTest(test)
|
|||||||
call add(s:messages, message)
|
call add(s:messages, message)
|
||||||
let s:done += 1
|
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
|
" Check if the test has left any swap files behind. Delete them before
|
||||||
" running tests again, they might interfere.
|
" running tests again, they might interfere.
|
||||||
let swapfiles = s:GetSwapFileList()
|
let swapfiles = s:GetSwapFileList()
|
||||||
|
@@ -3156,7 +3156,7 @@ func Test_autocmd_FileReadCmd()
|
|||||||
\ 'v:cmdarg = ++ff=mac',
|
\ 'v:cmdarg = ++ff=mac',
|
||||||
\ 'v:cmdarg = ++enc=utf-8'], getline(1, '$'))
|
\ 'v:cmdarg = ++enc=utf-8'], getline(1, '$'))
|
||||||
|
|
||||||
close!
|
bwipe!
|
||||||
augroup FileReadCmdTest
|
augroup FileReadCmdTest
|
||||||
au!
|
au!
|
||||||
augroup END
|
augroup END
|
||||||
|
Reference in New Issue
Block a user