vim-patch:partial:9.0.0719: too many delete() calls in tests

Problem:    Too many delete() calls in tests.
Solution:   Use deferred delete where possible.

56564964e6

This includes all changes expect changes in test_startup.vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2024-07-17 09:24:52 +08:00
parent e29f245a10
commit f17d819330
19 changed files with 126 additions and 231 deletions

View File

@@ -118,7 +118,7 @@ func Test_signal_TSTP()
au VimSuspend * call writefile(["VimSuspend triggered"], "XautoOut1", "as")
au VimResume * call writefile(["VimResume triggered"], "XautoOut2", "as")
END
call writefile(lines, 'XsetupAucmd')
call writefile(lines, 'XsetupAucmd', 'D')
let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6})
let pid_vim = term_getjob(buf)->job_info().process
@@ -148,7 +148,6 @@ func Test_signal_TSTP()
%bwipe!
call delete('.Xsig_TERM.swp')
call delete('XsetupAucmd')
call delete('XautoOut1')
call delete('XautoOut2')
endfunc
@@ -177,7 +176,7 @@ func Test_deadly_signal_TERM()
au VimLeave * call writefile(["VimLeave triggered"], "XautoOut", "as")
au VimLeavePre * call writefile(["VimLeavePre triggered"], "XautoOut", "as")
END
call writefile(lines, 'XsetupAucmd')
call writefile(lines, 'XsetupAucmd', 'D')
let buf = RunVimInTerminal('-S XsetupAucmd Xsig_TERM', {'rows': 6})
let pid_vim = term_getjob(buf)->job_info().process
@@ -201,7 +200,6 @@ func Test_deadly_signal_TERM()
%bwipe!
call delete('.Xsig_TERM.swp')
call delete('XsetupAucmd')
call delete('XautoOut')
endfunc