summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_vim9_expr.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-15 20:06:33 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-15 20:06:33 +0100
commit0e9bdad545e8e75b23c40e44cc6ec51330f5b465 (patch)
tree97d4e5cf151ada69600c5ad10cc85cbdbca6a129 /src/testdir/test_vim9_expr.vim
parent36343ae0fb7247e060abfd35fb8e4337b33abb4b (diff)
patch 9.0.0766: too many delete() calls in testsv9.0.0766
Problem: Too many delete() calls in tests. Solution: Use deferred delete where possible.
Diffstat (limited to 'src/testdir/test_vim9_expr.vim')
-rw-r--r--src/testdir/test_vim9_expr.vim10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 44e221a90f..b764e929cf 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -3490,7 +3490,7 @@ def Test_expr9_autoload_var()
var auto_lines =<< trim END
let autofile#var = 'found'
END
- mkdir('Xruntime/autoload', 'p')
+ mkdir('Xruntime/autoload', 'pR')
writefile(auto_lines, 'Xruntime/autoload/autofile.vim')
var save_rtp = &rtp
&rtp = getcwd() .. '/Xruntime,' .. &rtp
@@ -3506,7 +3506,6 @@ def Test_expr9_autoload_var()
v9.CheckDefExecAndScriptFailure(lines, 'E121: Undefined variable: autofile#other')
&rtp = save_rtp
- delete('Xruntime', 'rf')
enddef
def Test_expr9_call_autoload()
@@ -3515,7 +3514,7 @@ def Test_expr9_call_autoload()
return 'found'
enddef
END
- mkdir('Xruntime/autoload', 'p')
+ mkdir('Xruntime/autoload', 'pR')
writefile(auto_lines, 'Xruntime/autoload/some.vim')
var save_rtp = &rtp
&rtp = getcwd() .. '/Xruntime,' .. &rtp
@@ -3523,7 +3522,6 @@ def Test_expr9_call_autoload()
assert_equal('found', some#func())
&rtp = save_rtp
- delete('Xruntime', 'rf')
enddef
def Test_expr9_method_call()
@@ -3640,7 +3638,7 @@ def Test_expr9_method_call_import()
return map(items, (_, i) => i * i)
enddef
END
- call writefile(lines, 'Xsquare.vim')
+ call writefile(lines, 'Xsquare.vim', 'D')
lines =<< trim END
vim9script
@@ -3663,8 +3661,6 @@ def Test_expr9_method_call_import()
echo range(5)->Xsquare.NoSuchFunc()
END
v9.CheckScriptFailure(lines, 'E1048: Item not found in script: NoSuchFunc')
-
- delete('Xsquare.vim')
enddef