Mercurial > vim
diff src/testdir/test_memory_usage.vim @ 30582:72245f9c9405 v9.0.0626
patch 9.0.0626: too many delete() calls in tests
Commit: https://github.com/vim/vim/commit/b152b6a40f729ed81a25d2fa541a4e73e201bec4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 29 21:37:33 2022 +0100
patch 9.0.0626: 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:45:04 +0200 |
parents | 198a44d40394 |
children |
line wrap: on
line diff
--- a/src/testdir/test_memory_usage.vim +++ b/src/testdir/test_memory_usage.vim @@ -92,7 +92,7 @@ func Test_memory_func_capture_vargs() call s:f(0) endfor END - call writefile(lines, testfile) + call writefile(lines, testfile, 'D') let vim = s:vim_new() call vim.start('--clean', '-c', 'set noswapfile', testfile) @@ -114,7 +114,6 @@ func Test_memory_func_capture_vargs() call assert_inrange(lower, upper, after.max) call vim.stop() - call delete(testfile) endfunc func Test_memory_func_capture_lvars() @@ -130,7 +129,7 @@ func Test_memory_func_capture_lvars() call s:f() endfor END - call writefile(lines, testfile) + call writefile(lines, testfile, 'D') let vim = s:vim_new() call vim.start('--clean', '-c', 'set noswapfile', testfile) @@ -161,7 +160,6 @@ func Test_memory_func_capture_lvars() call assert_inrange(lower, upper, last) call vim.stop() - call delete(testfile) endfunc " vim: shiftwidth=2 sts=2 expandtab