1
0
forked from aniani/vim

patch 9.0.1005: a failed test may leave a swap file behind

Problem:    A failed test may leave a swap file behind.
Solution:   Delete the swap file to avoid another test to fail.  Use another
            file name.
This commit is contained in:
Bram Moolenaar
2022-12-04 23:00:41 +00:00
parent a0a6f3a22a
commit d0f8d39d20
7 changed files with 57 additions and 1 deletions

View File

@@ -137,6 +137,8 @@ endfunc
" Test the ":wincmd ^" and "<C-W>^" commands.
func Test_window_split_edit_alternate()
" in case a previous failure left a swap file behind
call delete('.Xfoo.swp')
" Test for failure when the alternate buffer/file no longer exists.
edit Xfoo | %bw
@@ -170,6 +172,8 @@ endfunc
" Test the ":[count]wincmd ^" and "[count]<C-W>^" commands.
func Test_window_split_edit_bufnr()
" in case a previous failure left a swap file behind
call delete('.Xfoo.swp')
%bwipeout
let l:nr = bufnr('%') + 1