Mercurial > vim
comparison src/testdir/test_quickfix.vim @ 14491:9df0fcbfebb2 v8.1.0259
patch 8.1.0259: no test for fixed quickfix issue
commit https://github.com/vim/vim/commit/3f347e4716c44cf6458be407e712e3d708d82580
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 9 21:19:20 2018 +0200
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)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 09 Aug 2018 21:30:05 +0200 |
parents | 19d99d9e670c |
children | b298737a7188 |
comparison
equal
deleted
inserted
replaced
14490:139e631d523f | 14491:9df0fcbfebb2 |
---|---|
3476 silent Xvimgrep Line5 Xtestfile2 | 3476 silent Xvimgrep Line5 Xtestfile2 |
3477 call assert_equal('Xtestfile2', bufname('')) | 3477 call assert_equal('Xtestfile2', bufname('')) |
3478 call assert_equal(5, line('.')) | 3478 call assert_equal(5, line('.')) |
3479 autocmd! QuickFixCmdPost | 3479 autocmd! QuickFixCmdPost |
3480 | 3480 |
3481 " Test for autocommands clearing the quickfix list before jumping to the | |
3482 " first error. This should not result in an error | |
3483 autocmd QuickFixCmdPost * call g:Xsetlist([], 'r') | |
3484 let v:errmsg = '' | |
3485 " Test for cfile/lfile | |
3486 Xfile Xerr | |
3487 call assert_true(v:errmsg !~# 'E42:') | |
3488 " Test for cbuffer/lbuffer | |
3489 edit Xerr | |
3490 Xbuffer | |
3491 call assert_true(v:errmsg !~# 'E42:') | |
3492 " Test for cexpr/lexpr | |
3493 Xexpr 'Xtestfile2:4:Line4' | |
3494 call assert_true(v:errmsg !~# 'E42:') | |
3495 " Test for grep/lgrep | |
3496 " The grepprg may not be set on non-Unix systems | |
3497 if has('unix') | |
3498 silent Xgrep Line5 Xtestfile2 | |
3499 call assert_true(v:errmsg !~# 'E42:') | |
3500 endif | |
3501 " Test for vimgrep/lvimgrep | |
3502 call assert_fails('silent Xvimgrep Line5 Xtestfile2', 'E480:') | |
3503 autocmd! QuickFixCmdPost | |
3504 | |
3481 call delete('Xerr') | 3505 call delete('Xerr') |
3482 call delete('Xtestfile1') | 3506 call delete('Xtestfile1') |
3483 call delete('Xtestfile2') | 3507 call delete('Xtestfile2') |
3484 endfunc | 3508 endfunc |
3485 | 3509 |