diff src/testdir/test_quickfix.vim @ 9982:e24aa20d815c v7.4.2264

commit https://github.com/vim/vim/commit/2b529bb6260b52246e92429375d995b9b5ce76b6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Aug 27 13:35:35 2016 +0200 patch 7.4.2264 Problem: When adding entries to an empty quickfix list the title is reset. Solution: Improve handling of the title. (Yegappan Lakshmanan)
author Christian Brabandt <cb@256bit.org>
date Sat, 27 Aug 2016 13:45:05 +0200
parents 67781bb0a61a
children 21f685af3fc1
line wrap: on
line diff
--- a/src/testdir/test_quickfix.vim
+++ b/src/testdir/test_quickfix.vim
@@ -1527,6 +1527,16 @@ function Xproperty_tests(cchar)
     call assert_equal('Sample', w:quickfix_title)
     Xclose
 
+    " Tests for action argument
+    silent! Xolder 999
+    let qfnr = g:Xgetlist({'all':1}).nr
+    call g:Xsetlist([], 'r', {'title' : 'N1'})
+    call assert_equal('N1', g:Xgetlist({'all':1}).title)
+    call g:Xsetlist([], ' ', {'title' : 'N2'})
+    call assert_equal(qfnr + 1, g:Xgetlist({'all':1}).nr)
+    call g:Xsetlist([], ' ', {'title' : 'N3'})
+    call assert_equal('N2', g:Xgetlist({'nr':2, 'title':1}).title)
+
     " Invalid arguments
     call assert_fails('call g:Xgetlist([])', 'E715')
     call assert_fails('call g:Xsetlist([], "a", [])', 'E715')