Mercurial > vim
diff src/testdir/test_indent.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 | 13b02c1ea0f7 |
children | dbec60b8c253 |
line wrap: on
line diff
--- a/src/testdir/test_indent.vim +++ b/src/testdir/test_indent.vim @@ -161,7 +161,7 @@ func Test_modeline_indent_expr() func GetIndent() return line('.') * 2 endfunc - call writefile(['# vim: indentexpr=GetIndent()'], 'Xmlfile.txt') + call writefile(['# vim: indentexpr=GetIndent()'], 'Xmlfile.txt', 'D') set modelineexpr new Xmlfile.txt call assert_equal('GetIndent()', &indentexpr) @@ -172,7 +172,6 @@ func Test_modeline_indent_expr() delfunc GetIndent let &modeline = modeline close! - call delete('Xmlfile.txt') endfunc func Test_indent_func_with_gq()