1
0
forked from aniani/vim

patch 9.0.0669: too many delete() calls in tests

Problem:    Too many delete() calls in tests.
Solution:   Use deferred delete where possible.
This commit is contained in:
Bram Moolenaar
2022-10-05 21:45:30 +01:00
parent 3ff71cda98
commit db77cb3c08
6 changed files with 80 additions and 165 deletions

View File

@@ -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()