aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 23:13:10 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-02 12:20:34 -0500
commit01eda00962258a881cbacb902f1f508e70249470 (patch)
treea4a85ca6593e658095f7cd92c5df324b5f2a305e /src/nvim/testdir
parent48caf1df8581a9a9da9072f901411b918333952d (diff)
downloadrneovim-01eda00962258a881cbacb902f1f508e70249470.tar.gz
rneovim-01eda00962258a881cbacb902f1f508e70249470.tar.bz2
rneovim-01eda00962258a881cbacb902f1f508e70249470.zip
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 vim/vim#5527, closes vim/vim#6216) https://github.com/vim/vim/commit/e928366de5deca359fad779a4f740db703296302
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_quickfix.vim30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim
index be7ea908c7..48c0a83053 100644
--- a/src/nvim/testdir/test_quickfix.vim
+++ b/src/nvim/testdir/test_quickfix.vim
@@ -1260,6 +1260,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'