Mercurial > vim
diff src/testdir/test_quickfix.vim @ 27605:bf540a32439a v8.2.4329
patch 8.2.4329: no support for end line number and column in 'errorformat'
Commit: https://github.com/vim/vim/commit/e023d499378942a6c3a3855cbe461ec2cb570f63
Author: haya14busa <haya14busa@gmail.com>
Date: Tue Feb 8 18:09:29 2022 +0000
patch 8.2.4329: no support for end line number and column in 'errorformat'
Problem: No support for end line number and column in 'errorformat'.
Solution: Add %e and %k. (closes https://github.com/vim/vim/issues/9624)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Feb 2022 19:15:03 +0100 |
parents | cb46dd386990 |
children | 44a552776007 |
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim +++ b/src/testdir/test_quickfix.vim @@ -1469,6 +1469,29 @@ func Test_efm_error_type() let &efm = save_efm endfunc +" Test for end_lnum ('%e') and end_col ('%k') fields in 'efm' +func Test_efm_end_lnum_col() + let save_efm = &efm + + " single line + set efm=%f:%l-%e:%c-%k:%t:%m + cexpr ["Xfile1:10-20:1-2:E:msg1", "Xfile1:20-30:2-3:W:msg2",] + let output = split(execute('clist'), "\n") + call assert_equal([ + \ ' 1 Xfile1:10-20 col 1-2 error: msg1', + \ ' 2 Xfile1:20-30 col 2-3 warning: msg2'], output) + + " multiple lines + set efm=%A%n)%m,%Z%f:%l-%e:%c-%k + cexpr ["1)msg1", "Xfile1:14-24:1-2", + \ "2)msg2", "Xfile1:24-34:3-4"] + let output = split(execute('clist'), "\n") + call assert_equal([ + \ ' 1 Xfile1:14-24 col 1-2 error 1: msg1', + \ ' 2 Xfile1:24-34 col 3-4 error 2: msg2'], output) + let &efm = save_efm +endfunc + func XquickfixChangedByAutocmd(cchar) call s:setup_commands(a:cchar) if a:cchar == 'c'