diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-14 16:54:33 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-04-14 19:09:19 -0400 |
| commit | e52f6f21a116a85fc90e273a7ddede7013520231 (patch) | |
| tree | afa4261fcd27a1a1ac7b271a10cd601e9884ec5a /src/nvim/testdir/test_quickfix.vim | |
| parent | 6de1ed1ff11a59b063ae8d199aab17977d7b445f (diff) | |
| download | rneovim-e52f6f21a116a85fc90e273a7ddede7013520231.tar.gz rneovim-e52f6f21a116a85fc90e273a7ddede7013520231.tar.bz2 rneovim-e52f6f21a116a85fc90e273a7ddede7013520231.zip | |
vim-patch:8.0.1093: various small quickfix issues
Problem: Various small quickfix issues.
Solution: Remove ":" prefix from title set by a user. Add the qf_id2nr().
function. Add a couple more tests. Update documentation.
(Yegappan Lakshmanan)
https://github.com/vim/vim/commit/b4d5fbabc99917a8069ba32a60c2d73d4f60e128
Diffstat (limited to 'src/nvim/testdir/test_quickfix.vim')
| -rw-r--r-- | src/nvim/testdir/test_quickfix.vim | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_quickfix.vim b/src/nvim/testdir/test_quickfix.vim index 6227095f4f..7c4d1d3b81 100644 --- a/src/nvim/testdir/test_quickfix.vim +++ b/src/nvim/testdir/test_quickfix.vim @@ -469,6 +469,19 @@ func s:test_xhelpgrep(cchar) " This wipes out the buffer, make sure that doesn't cause trouble. Xclose + if a:cchar == 'l' + " When a help window is present, running :lhelpgrep should reuse the + " help window and not the current window + new | only + call g:Xsetlist([], 'f') + help index.txt + wincmd w + lhelpgrep quickfix + call assert_equal(1, winnr()) + call assert_notequal([], getloclist(1)) + call assert_equal([], getloclist(2)) + endif + new | only " Search for non existing help string @@ -1666,6 +1679,10 @@ func HistoryTest(cchar) call assert_equal(' error list 1 of 3; 1 ' . common, res[0]) call assert_equal(' error list 2 of 3; 2 ' . common, res[1]) call assert_equal('> error list 3 of 3; 3 ' . common, res[2]) + + call g:Xsetlist([], 'f') + let l = split(execute(a:cchar . 'hist'), "\n") + call assert_equal('No entries', l[0]) endfunc func Test_history() @@ -1844,6 +1861,11 @@ func Xproperty_tests(cchar) let l = g:Xgetlist({'items':1}) call assert_equal(0, len(l.items)) + call g:Xsetlist([], 'r', {'title' : 'TestTitle'}) + call g:Xsetlist([], 'r', {'items' : [{'filename' : 'F1', 'lnum' : 10, 'text' : 'L10'}]}) + call g:Xsetlist([], 'r', {'items' : [{'filename' : 'F1', 'lnum' : 10, 'text' : 'L10'}]}) + call assert_equal('TestTitle', g:Xgetlist({'title' : 1}).title) + " The following used to crash Vim with address sanitizer call g:Xsetlist([], 'f') call g:Xsetlist([], 'a', {'items' : [{'filename':'F1', 'lnum':10}]}) @@ -1886,10 +1908,10 @@ func Xproperty_tests(cchar) call g:Xsetlist([], 'r', l2) let newl1=g:Xgetlist({'nr':1,'all':1}) let newl2=g:Xgetlist({'nr':2,'all':1}) - call assert_equal(':Fruits', newl1.title) + call assert_equal('Fruits', newl1.title) call assert_equal(['Fruits'], newl1.context) call assert_equal('Line20', newl1.items[0].text) - call assert_equal(':Colors', newl2.title) + call assert_equal('Colors', newl2.title) call assert_equal(['Colors'], newl2.context) call assert_equal('Line10', newl2.items[0].text) call g:Xsetlist([], 'f') |