mirror of
https://github.com/neovim/neovim.git
synced 2025-12-15 19:05:40 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user