aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-06-08 07:03:22 +0800
committerGitHub <noreply@github.com>2023-06-08 07:03:22 +0800
commit38b0bb3c93022afcc54c0891d2eced02d2a9fa3a (patch)
treeb38520f58433299aa3a6ac9e0f594b796d8ba76c /test
parent0329f5c2f4f300b9ffe66b0b4b2db1d51c6293d1 (diff)
downloadrneovim-38b0bb3c93022afcc54c0891d2eced02d2a9fa3a.tar.gz
rneovim-38b0bb3c93022afcc54c0891d2eced02d2a9fa3a.tar.bz2
rneovim-38b0bb3c93022afcc54c0891d2eced02d2a9fa3a.zip
vim-patch:9.0.1616: quickfix text field is truncated (#23951)
Problem: Quickfix text field is truncated. Solution: Fix output of text field after pattern field in quickfix buffer. (Shane Harper, closes vim/vim#12498) https://github.com/vim/vim/commit/5bf042810b19a627eda2f170624a0cfd7b4f6ed6 Co-authored-by: Shane Harper <shane@shaneharper.net>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_quickfix.vim19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/old/testdir/test_quickfix.vim b/test/old/testdir/test_quickfix.vim
index 9e8e87fbde..6378ee8770 100644
--- a/test/old/testdir/test_quickfix.vim
+++ b/test/old/testdir/test_quickfix.vim
@@ -167,19 +167,21 @@ func XlistTests(cchar)
\ {'lnum':20,'col':10,'type':'e','text':'Error','nr':22},
\ {'lnum':30,'col':15,'type':'i','text':'Info','nr':33},
\ {'lnum':40,'col':20,'type':'x', 'text':'Other','nr':44},
- \ {'lnum':50,'col':25,'type':"\<C-A>",'text':'one','nr':55}])
+ \ {'lnum':50,'col':25,'type':"\<C-A>",'text':'one','nr':55},
+ \ {'lnum':0,'type':'e','text':'Check type field is output even when lnum==0. ("error" was not output by v9.0.0736.)','nr':66}])
let l = split(execute('Xlist', ""), "\n")
call assert_equal([' 1:10 col 5 warning 11: Warning',
\ ' 2:20 col 10 error 22: Error',
\ ' 3:30 col 15 info 33: Info',
\ ' 4:40 col 20 x 44: Other',
- \ ' 5:50 col 25 55: one'], l)
+ \ ' 5:50 col 25 55: one',
+ \ ' 6 error 66: Check type field is output even when lnum==0. ("error" was not output by v9.0.0736.)'], l)
" Test for module names, one needs to explicitly set `'valid':v:true` so
call g:Xsetlist([
- \ {'lnum':10,'col':5,'type':'W','module':'Data.Text','text':'ModuleWarning','nr':11,'valid':v:true},
- \ {'lnum':20,'col':10,'type':'W','module':'Data.Text','filename':'Data/Text.hs','text':'ModuleWarning','nr':22,'valid':v:true},
- \ {'lnum':30,'col':15,'type':'W','filename':'Data/Text.hs','text':'FileWarning','nr':33,'valid':v:true}])
+ \ {'lnum':10,'col':5,'type':'W','module':'Data.Text','text':'ModuleWarning','nr':11,'valid':v:true},
+ \ {'lnum':20,'col':10,'type':'W','module':'Data.Text','filename':'Data/Text.hs','text':'ModuleWarning','nr':22,'valid':v:true},
+ \ {'lnum':30,'col':15,'type':'W','filename':'Data/Text.hs','text':'FileWarning','nr':33,'valid':v:true}])
let l = split(execute('Xlist', ""), "\n")
call assert_equal([' 1 Data.Text:10 col 5 warning 11: ModuleWarning',
\ ' 2 Data.Text:20 col 10 warning 22: ModuleWarning',
@@ -6304,4 +6306,11 @@ func Test_setqflist_stopinsert()
bwipe!
endfunc
+func Test_quickfix_buffer_contents()
+ call setqflist([{'filename':'filename', 'pattern':'pattern', 'text':'text'}])
+ copen
+ call assert_equal(['filename|pattern| text'], getline(1, '$')) " The assert failed with Vim v9.0.0736; '| text' did not appear after the pattern.
+ call setqflist([], 'f')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab