mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
vim-patch:8.0.1267: Test_swap_group may leave file behind
Problem: Test_swap_group may leave file behind.
Solution: Add a try/finally.
5842a748be
This commit is contained in:
@@ -60,6 +60,7 @@ func Test_swap_group()
|
|||||||
throw 'Skipped: need at least two groups, got ' . string(groups)
|
throw 'Skipped: need at least two groups, got ' . string(groups)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
try
|
||||||
call delete('Xtest')
|
call delete('Xtest')
|
||||||
split Xtest
|
split Xtest
|
||||||
call setline(1, 'just some text')
|
call setline(1, 'just some text')
|
||||||
@@ -81,8 +82,9 @@ func Test_swap_group()
|
|||||||
bwipe!
|
bwipe!
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
finally
|
||||||
call delete('Xtest')
|
call delete('Xtest')
|
||||||
|
endtry
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_missing_dir()
|
func Test_missing_dir()
|
||||||
|
@@ -242,6 +242,7 @@ func Test_undojoin()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_undo_write()
|
func Test_undo_write()
|
||||||
|
call delete('Xtest')
|
||||||
split Xtest
|
split Xtest
|
||||||
call feedkeys("ione one one\<Esc>", 'xt')
|
call feedkeys("ione one one\<Esc>", 'xt')
|
||||||
w!
|
w!
|
||||||
|
Reference in New Issue
Block a user