patch 9.0.0631: too many delete() calls in tests
Problem: Too many delete() calls in tests.
Solution: Use deferred delete where possible.
diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim
index 1b339d4..3472b40 100644
--- a/src/testdir/test_popupwin_textprop.vim
+++ b/src/testdir/test_popupwin_textprop.vim
@@ -28,7 +28,7 @@
\ close: 'click',
\ })
END
- call writefile(lines, 'XtestTextpropPopup')
+ call writefile(lines, 'XtestTextpropPopup', 'D')
let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10})
call VerifyScreenDump(buf, 'Test_popup_textprop_01', {})
@@ -52,7 +52,6 @@
" clean up
call StopVimInTerminal(buf)
- call delete('XtestTextpropPopup')
endfunc
func Test_textprop_popup_corners()
@@ -91,7 +90,7 @@
\ padding: [0,1,0,1],
\ })
END
- call writefile(lines, 'XtestTextpropPopupCorners')
+ call writefile(lines, 'XtestTextpropPopupCorners', 'D')
let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12})
call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {})
@@ -113,7 +112,6 @@
" clean up
call StopVimInTerminal(buf)
- call delete('XtestTextpropPopupCorners')
endfunc
func Test_textprop_popup_offsets()
@@ -159,7 +157,7 @@
\ padding: [0,1,0,1],
\ })
END
- call writefile(lines, 'XtestTextpropPopupOffset')
+ call writefile(lines, 'XtestTextpropPopupOffset', 'D')
let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12})
call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {})
@@ -169,7 +167,6 @@
" clean up
call StopVimInTerminal(buf)
- call delete('XtestTextpropPopupOffset')
endfunc