mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.1.0259: no test for fixed quickfix issue
Problem: No test for fixed quickfix issue. Solution: Add a test. Clean up the code a bit. (Yegappan Lakshmanan)
This commit is contained in:
@@ -3478,6 +3478,30 @@ func Xautocmd_changelist(cchar)
|
||||
call assert_equal(5, line('.'))
|
||||
autocmd! QuickFixCmdPost
|
||||
|
||||
" Test for autocommands clearing the quickfix list before jumping to the
|
||||
" first error. This should not result in an error
|
||||
autocmd QuickFixCmdPost * call g:Xsetlist([], 'r')
|
||||
let v:errmsg = ''
|
||||
" Test for cfile/lfile
|
||||
Xfile Xerr
|
||||
call assert_true(v:errmsg !~# 'E42:')
|
||||
" Test for cbuffer/lbuffer
|
||||
edit Xerr
|
||||
Xbuffer
|
||||
call assert_true(v:errmsg !~# 'E42:')
|
||||
" Test for cexpr/lexpr
|
||||
Xexpr 'Xtestfile2:4:Line4'
|
||||
call assert_true(v:errmsg !~# 'E42:')
|
||||
" Test for grep/lgrep
|
||||
" The grepprg may not be set on non-Unix systems
|
||||
if has('unix')
|
||||
silent Xgrep Line5 Xtestfile2
|
||||
call assert_true(v:errmsg !~# 'E42:')
|
||||
endif
|
||||
" Test for vimgrep/lvimgrep
|
||||
call assert_fails('silent Xvimgrep Line5 Xtestfile2', 'E480:')
|
||||
autocmd! QuickFixCmdPost
|
||||
|
||||
call delete('Xerr')
|
||||
call delete('Xtestfile1')
|
||||
call delete('Xtestfile2')
|
||||
|
Reference in New Issue
Block a user