comparison src/testdir/test_quickfix.vim @ 32568:cb1af9880f6d v9.0.1616

patch 9.0.1616: quickfix text field is truncated Commit: https://github.com/vim/vim/commit/5bf042810b19a627eda2f170624a0cfd7b4f6ed6 Author: Shane Harper <shane@shaneharper.net> Date: Wed Jun 7 19:09:57 2023 +0100 patch 9.0.1616: quickfix text field is truncated Problem: Quickfix text field is truncated. Solution: Fix output of text field after pattern field in quickfix buffer. (Shane Harper, closes #12498)
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Jun 2023 20:15:04 +0200
parents b5d8d556ea7f
children 448aef880252
comparison
equal deleted inserted replaced
32567:0e60e3725300 32568:cb1af9880f6d
165 " Different types of errors 165 " Different types of errors
166 call g:Xsetlist([{'lnum':10,'col':5,'type':'W', 'text':'Warning','nr':11}, 166 call g:Xsetlist([{'lnum':10,'col':5,'type':'W', 'text':'Warning','nr':11},
167 \ {'lnum':20,'col':10,'type':'e','text':'Error','nr':22}, 167 \ {'lnum':20,'col':10,'type':'e','text':'Error','nr':22},
168 \ {'lnum':30,'col':15,'type':'i','text':'Info','nr':33}, 168 \ {'lnum':30,'col':15,'type':'i','text':'Info','nr':33},
169 \ {'lnum':40,'col':20,'type':'x', 'text':'Other','nr':44}, 169 \ {'lnum':40,'col':20,'type':'x', 'text':'Other','nr':44},
170 \ {'lnum':50,'col':25,'type':"\<C-A>",'text':'one','nr':55}]) 170 \ {'lnum':50,'col':25,'type':"\<C-A>",'text':'one','nr':55},
171 \ {'lnum':0,'type':'e','text':'Check type field is output even when lnum==0. ("error" was not output by v9.0.0736.)','nr':66}])
171 let l = split(execute('Xlist', ""), "\n") 172 let l = split(execute('Xlist', ""), "\n")
172 call assert_equal([' 1:10 col 5 warning 11: Warning', 173 call assert_equal([' 1:10 col 5 warning 11: Warning',
173 \ ' 2:20 col 10 error 22: Error', 174 \ ' 2:20 col 10 error 22: Error',
174 \ ' 3:30 col 15 info 33: Info', 175 \ ' 3:30 col 15 info 33: Info',
175 \ ' 4:40 col 20 x 44: Other', 176 \ ' 4:40 col 20 x 44: Other',
176 \ ' 5:50 col 25 55: one'], l) 177 \ ' 5:50 col 25 55: one',
178 \ ' 6 error 66: Check type field is output even when lnum==0. ("error" was not output by v9.0.0736.)'], l)
177 179
178 " Test for module names, one needs to explicitly set `'valid':v:true` so 180 " Test for module names, one needs to explicitly set `'valid':v:true` so
179 call g:Xsetlist([ 181 call g:Xsetlist([
180 \ {'lnum':10,'col':5,'type':'W','module':'Data.Text','text':'ModuleWarning','nr':11,'valid':v:true}, 182 \ {'lnum':10,'col':5,'type':'W','module':'Data.Text','text':'ModuleWarning','nr':11,'valid':v:true},
181 \ {'lnum':20,'col':10,'type':'W','module':'Data.Text','filename':'Data/Text.hs','text':'ModuleWarning','nr':22,'valid':v:true}, 183 \ {'lnum':20,'col':10,'type':'W','module':'Data.Text','filename':'Data/Text.hs','text':'ModuleWarning','nr':22,'valid':v:true},
6426 delfunc StopInsert 6428 delfunc StopInsert
6427 call setqflist([], 'f') 6429 call setqflist([], 'f')
6428 bwipe! 6430 bwipe!
6429 endfunc 6431 endfunc
6430 6432
6433 func Test_quickfix_buffer_contents()
6434 call setqflist([{'filename':'filename', 'pattern':'pattern', 'text':'text'}])
6435 copen
6436 call assert_equal(['filename|pattern| text'], getline(1, '$')) " The assert failed with Vim v9.0.0736; '| text' did not appear after the pattern.
6437 call setqflist([], 'f')
6438 endfunc
6439
6431 " vim: shiftwidth=2 sts=2 expandtab 6440 " vim: shiftwidth=2 sts=2 expandtab