0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

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.
This commit is contained in:
Bram Moolenaar 2022-12-05 20:58:04 +00:00
parent 99d19438ca
commit fa2533c8bb
2 changed files with 10 additions and 1 deletions

View File

@ -368,7 +368,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

View File

@ -695,6 +695,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1012,
/**/
1011,
/**/