commit 5e9afca1c19914cdf6f81685c7950ab180278b1f
parent e69cb86750d0e4b91d226e827d1eae2a98639777
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu, 21 Apr 2022 18:28:37 +0800
vim-patch:8.2.4802: test is not cleaned up
Problem: Test is not cleaned up.
Solution: Make test clean up after itself. Avoid NUL. (closes vim/vim#10233)
https://github.com/vim/vim/commit/7851c69a120ea6ce8c122dd7198adbe5aec83ea5
Adapt test_autocmd_vimgrep() to Nvim.
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim
@@ -2713,6 +2713,8 @@ func Test_autocmd_quit_psearch()
augroup aucmd_win_test
au!
augroup END
+ new
+ pclose
endfunc
" Fuzzer found some strange combination that caused a crash.
@@ -2748,12 +2750,12 @@ func Test_autocmd_closing_cmdwin()
endfunc
func Test_autocmd_vimgrep()
- %bwipe!
augroup aucmd_vimgrep
au QuickfixCmdPre,BufNew,BufReadCmd * sb
- au QuickfixCmdPre,BufNew,BufReadCmd * q9
+ " Nvim makes aucmd_win the last window
+ " au QuickfixCmdPre,BufNew,BufReadCmd * q9
+ au QuickfixCmdPre,BufNew,BufReadCmd * exe 'q' .. (winnr('$') - (win_gettype(winnr('$')) == 'autocmd'))
augroup END
- %bwipe!
call assert_fails('lv ?a? foo', 'E926:')
augroup aucmd_vimgrep