diff src/testdir/test_popupwin_textprop.vim @ 30592:457ea0570b6f v9.0.0631

patch 9.0.0631: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/145d1fd91041bd2a22a11eef0357702e420796e2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Sep 30 21:57:11 2022 +0100 patch 9.0.0631: too many delete() calls in tests Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
author Bram Moolenaar <Bram@vim.org>
date Fri, 30 Sep 2022 23:00:10 +0200
parents 49b78d6465e5
children dbec60b8c253
line wrap: on
line diff
--- a/src/testdir/test_popupwin_textprop.vim
+++ b/src/testdir/test_popupwin_textprop.vim
@@ -28,7 +28,7 @@ func Test_textprop_popup()
 	      \ 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 @@ func Test_textprop_popup()
 
   " clean up
   call StopVimInTerminal(buf)
-  call delete('XtestTextpropPopup')
 endfunc
 
 func Test_textprop_popup_corners()
@@ -91,7 +90,7 @@ func Test_textprop_popup_corners()
 	      \ 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 @@ func Test_textprop_popup_corners()
 
   " clean up
   call StopVimInTerminal(buf)
-  call delete('XtestTextpropPopupCorners')
 endfunc
 
 func Test_textprop_popup_offsets()
@@ -159,7 +157,7 @@ func Test_textprop_popup_offsets()
 	      \ 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 @@ func Test_textprop_popup_offsets()
 
   " clean up
   call StopVimInTerminal(buf)
-  call delete('XtestTextpropPopupOffset')
 endfunc