From 5e9afca1c19914cdf6f81685c7950ab180278b1f Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 21 Apr 2022 18:28:37 +0800 Subject: 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. --- src/nvim/testdir/test_autocmd.vim | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 5913032195..13be82a71d 100644 --- 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 -- cgit