diff src/testdir/test_lambda.vim @ 30580:f08ed0738f7a v9.0.0625

patch 9.0.0625: too many delete() calls in tests Commit: https://github.com/vim/vim/commit/7dd5a78b88af7734bdbf236fdfafb49f27a0ca2e Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 29 21:01:57 2022 +0100 patch 9.0.0625: 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 Thu, 29 Sep 2022 22:15:04 +0200
parents 58fb880f3607
children cbfbf0e17cd0
line wrap: on
line diff
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -354,7 +354,7 @@ func Test_closure_error()
       return 1
     endfunc
   END
-  call writefile(l, 'Xscript')
+  call writefile(l, 'Xscript', 'D')
   let caught_932 = 0
   try
     source Xscript
@@ -362,7 +362,6 @@ func Test_closure_error()
     let caught_932 = 1
   endtry
   call assert_equal(1, caught_932)
-  call delete('Xscript')
 endfunc
 
 " vim: shiftwidth=2 sts=2 expandtab