summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-11 19:31:28 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-11 19:31:28 +0200
commitb4d5fbabc99917a8069ba32a60c2d73d4f60e128 (patch)
tree7a3c17d3362f21ce9263283730a8f6ddea6c9cc6 /src/testdir
parent45d5f26d11d9aac2383453d2c1a8582cad1c8a3d (diff)
downloadvim-b4d5fbabc99917a8069ba32a60c2d73d4f60e128.zip
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)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test_quickfix.vim26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/testdir/test_quickfix.vim b/src/testdir/test_quickfix.vim
index 6a8d0e7bf..671381ce1 100644
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -487,6 +487,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
@@ -1684,6 +1697,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()
@@ -1862,6 +1879,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}]})
@@ -1904,10 +1926,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')