Mercurial > vim
diff src/testdir/test_regexp_utf8.vim @ 30669:de319bf98a39 v9.0.0669
patch 9.0.0669: too many delete() calls in tests
Commit: https://github.com/vim/vim/commit/db77cb3c08784e6038dd029271b2080c1b2d9acb
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 5 21:45:30 2022 +0100
patch 9.0.0669: 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 | Wed, 05 Oct 2022 23:00:04 +0200 |
parents | 893f448af76d |
children | 2295ee9c025d |
line wrap: on
line diff
--- a/src/testdir/test_regexp_utf8.vim +++ b/src/testdir/test_regexp_utf8.vim @@ -555,20 +555,17 @@ func Test_match_char_class_upper() endfunc func Test_match_invalid_byte() - call writefile(0z630a.765d30aa0a.2e0a.790a.4030, 'Xinvalid') + call writefile(0z630a.765d30aa0a.2e0a.790a.4030, 'Xinvalid', 'D') new source Xinvalid bwipe! - call delete('Xinvalid') endfunc func Test_match_illegal_byte() " Text has illegal bytes which need to be set explicitly let lines = ["norm :set no\x01\<CR>", "silent n\xff", "silent norm :b\xff\<CR>"] - call writefile(lines, 'Xregexp') + call writefile(lines, 'Xregexp', 'D') call system(GetVimCommand() .. ' -X -Z -e -s -S Xregexp -c qa!') - - call delete('Xregexp') endfunc func Test_match_too_complicated()