1
0
forked from aniani/vim

patch 8.2.0917: quickfix entries do not suport a "note" type

Problem:    Quickfix entries do not suport a "note" type.
Solution:   Add support for "note". (partly by Yegappan Lakshmanan,
            closes #5527, closes #6216)
This commit is contained in:
Bram Moolenaar
2020-06-07 14:10:47 +02:00
parent 975a880a13
commit e928366de5
4 changed files with 46 additions and 4 deletions

View File

@@ -1347,6 +1347,36 @@ func Test_efm2()
let &efm = save_efm
endfunc
" Test for '%t' (error type) field in 'efm'
func Test_efm_error_type()
let save_efm = &efm
" error type
set efm=%f:%l:%t:%m
cexpr ["Xfile1:10:E:msg1", "Xfile1:20:W:msg2", "Xfile1:30:I:msg3",
\ "Xfile1:40:N:msg4", "Xfile1:50:R:msg5"]
let output = split(execute('clist'), "\n")
call assert_equal([
\ ' 1 Xfile1:10 error: msg1',
\ ' 2 Xfile1:20 warning: msg2',
\ ' 3 Xfile1:30 info: msg3',
\ ' 4 Xfile1:40 note: msg4',
\ ' 5 Xfile1:50 R: msg5'], output)
" error type and a error number
set efm=%f:%l:%t:%n:%m
cexpr ["Xfile1:10:E:2:msg1", "Xfile1:20:W:4:msg2", "Xfile1:30:I:6:msg3",
\ "Xfile1:40:N:8:msg4", "Xfile1:50:R:3:msg5"]
let output = split(execute('clist'), "\n")
call assert_equal([
\ ' 1 Xfile1:10 error 2: msg1',
\ ' 2 Xfile1:20 warning 4: msg2',
\ ' 3 Xfile1:30 info 6: msg3',
\ ' 4 Xfile1:40 note 8: msg4',
\ ' 5 Xfile1:50 R 3: msg5'], output)
let &efm = save_efm
endfunc
func XquickfixChangedByAutocmd(cchar)
call s:setup_commands(a:cchar)
if a:cchar == 'c'