Patch 7.4.1912
Problem: No test for using setqflist() on an older quickfix list.
Solution: Add a couple of tests.
Files: src/testdir/test_quickfix.vim
*** ../vim-7.4.1911/src/testdir/test_quickfix.vim 2016-05-25
21:22:56.421828207 +0200
--- src/testdir/test_quickfix.vim 2016-06-09 22:06:03.319965107 +0200
***************
*** 752,760 ****
--- 752,803 ----
call SetXlistTests('c', bnum)
call SetXlistTests('l', bnum)
+ enew!
call delete('Xtestfile')
endfunction
+ func Test_setqflist_empty_middle()
+ " create three quickfix lists
+ vimgrep Test_ test_quickfix.vim
+ let testlen = len(getqflist())
+ call assert_true(testlen > 0)
+ vimgrep empty test_quickfix.vim
+ call assert_true(len(getqflist()) > 0)
+ vimgrep matches test_quickfix.vim
+ let matchlen = len(getqflist())
+ call assert_true(matchlen > 0)
+ colder
+ " make the middle list empty
+ call setqflist([], 'r')
+ call assert_true(len(getqflist()) == 0)
+ colder
+ call assert_equal(testlen, len(getqflist()))
+ cnewer
+ cnewer
+ call assert_equal(matchlen, len(getqflist()))
+ endfunc
+
+ func Test_setqflist_empty_older()
+ " create three quickfix lists
+ vimgrep one test_quickfix.vim
+ let onelen = len(getqflist())
+ call assert_true(onelen > 0)
+ vimgrep two test_quickfix.vim
+ let twolen = len(getqflist())
+ call assert_true(twolen > 0)
+ vimgrep three test_quickfix.vim
+ let threelen = len(getqflist())
+ call assert_true(threelen > 0)
+ colder 2
+ " make the first list empty, check the others didn't change
+ call setqflist([], 'r')
+ call assert_true(len(getqflist()) == 0)
+ cnewer
+ call assert_equal(twolen, len(getqflist()))
+ cnewer
+ call assert_equal(threelen, len(getqflist()))
+ endfunc
+
function! XquickfixSetListWithAct(cchar)
let Xolder = a:cchar . 'older'
let Xnewer = a:cchar . 'newer'
*** ../vim-7.4.1911/src/version.c 2016-06-09 20:24:24.312049004 +0200
--- src/version.c 2016-06-09 22:13:13.423959190 +0200
***************
*** 755,756 ****
--- 755,758 ----
{ /* Add new patch number below this line */
+ /**/
+ 1912,
/**/
--
hundred-and-one symptoms of being an internet addict:
83. Batteries in the TV remote now last for months.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.