mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
vim-patch:9.0.1012: tests may get stuck in buffer with swap file
Problem: Tests may get stuck in buffer with swap file.
Solution: Bail out when bwipe! doesn't get another buffer.
fa2533c8bb
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -323,7 +323,14 @@ func RunTheTest(test)
|
||||
" buffer, continue until we end up in an empty no-name buffer without a swap
|
||||
" file.
|
||||
while bufname() != '' || execute('swapname') !~ 'No swap file'
|
||||
bwipe!
|
||||
let bn = bufnr()
|
||||
|
||||
noswapfile bwipe!
|
||||
|
||||
if bn == bufnr()
|
||||
" avoid getting stuck in the same buffer
|
||||
break
|
||||
endif
|
||||
endwhile
|
||||
|
||||
" Check if the test has left any swap files behind. Delete them before
|
||||
|
Reference in New Issue
Block a user