patch 8.2.3440: recover test fails if there is an old swap file

Problem:    Recover test fails if there is an old swap file.
Solution:   Delete old swap files.
This commit is contained in:
Bram Moolenaar
2021-09-14 22:58:23 +02:00
parent 78eb9cce91
commit f2a8bafa4b
2 changed files with 8 additions and 0 deletions

View File

@ -170,6 +170,12 @@ func Test_recover_empty_swap_file()
call assert_match('Unable to read block 0 from .Xfile1.swp', msg)
call assert_equal('Xfile1', @%)
bw!
" make sure there are no old swap files laying around
for f in glob('.sw?', 0, 1)
call delete(f)
endfor
" :recover from an empty buffer
call assert_fails('recover', 'E305:')
call delete('.Xfile1.swp')

View File

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