forked from aniani/vim
patch 8.0.0687: minor issues related to quickfix
Problem: Minor issues related to quickfix.
Solution: Set the proper return status for all cases in setqflist() and at
test cases for this. Move the "adding" flag outside of
FEAT_WINDOWS. Minor update to the setqflist() help text. (Yegappan
Lakshmanan)
This commit is contained in:
@@ -1720,7 +1720,8 @@ func Xproperty_tests(cchar)
|
||||
Xopen
|
||||
wincmd p
|
||||
call g:Xsetlist([{'filename':'foo', 'lnum':27}])
|
||||
call g:Xsetlist([], 'a', {'title' : 'Sample'})
|
||||
let s = g:Xsetlist([], 'a', {'title' : 'Sample'})
|
||||
call assert_equal(0, s)
|
||||
let d = g:Xgetlist({"title":1})
|
||||
call assert_equal('Sample', d.title)
|
||||
|
||||
@@ -1774,7 +1775,8 @@ func Xproperty_tests(cchar)
|
||||
endif
|
||||
|
||||
" Context related tests
|
||||
call g:Xsetlist([], 'a', {'context':[1,2,3]})
|
||||
let s = g:Xsetlist([], 'a', {'context':[1,2,3]})
|
||||
call assert_equal(0, s)
|
||||
call test_garbagecollect_now()
|
||||
let d = g:Xgetlist({'context':1})
|
||||
call assert_equal([1,2,3], d.context)
|
||||
@@ -1839,8 +1841,9 @@ func Xproperty_tests(cchar)
|
||||
" Test for setting/getting items
|
||||
Xexpr ""
|
||||
let qfprev = g:Xgetlist({'nr':0})
|
||||
call g:Xsetlist([], ' ', {'title':'Green',
|
||||
let s = g:Xsetlist([], ' ', {'title':'Green',
|
||||
\ 'items' : [{'filename':'F1', 'lnum':10}]})
|
||||
call assert_equal(0, s)
|
||||
let qfcur = g:Xgetlist({'nr':0})
|
||||
call assert_true(qfcur.nr == qfprev.nr + 1)
|
||||
let l = g:Xgetlist({'items':1})
|
||||
|
||||
Reference in New Issue
Block a user