Patch 8.1.2310
Problem:    No proper test for directory changes in quickfix.
Solution:   Add a test that uses multiple directories. (Yegappan Lakshmanan,
            closes #5230)
Files:      src/testdir/test_quickfix.vim


*** ../vim-8.1.2309/src/testdir/test_quickfix.vim       2019-10-26 
16:48:35.404890864 +0200
--- src/testdir/test_quickfix.vim       2019-11-16 21:03:16.636756838 +0100
***************
*** 4393,4396 ****
--- 4393,4438 ----
    augroup END
  endfunc
  
+ " Test for using a file in one of the parent directories.
+ func Test_search_in_dirstack()
+   call mkdir('Xtestdir/a/b/c', 'p')
+   let save_cwd = getcwd()
+   call writefile(["X1_L1", "X1_L2"], 'Xtestdir/Xfile1')
+   call writefile(["X2_L1", "X2_L2"], 'Xtestdir/a/Xfile2')
+   call writefile(["X3_L1", "X3_L2"], 'Xtestdir/a/b/Xfile3')
+   call writefile(["X4_L1", "X4_L2"], 'Xtestdir/a/b/c/Xfile4')
+ 
+   let lines = "Entering dir Xtestdir\n" .
+             \ "Entering dir a\n" .
+             \ "Entering dir b\n" .
+             \ "Xfile2:2:X2_L2\n" .
+             \ "Leaving dir a\n" .
+             \ "Xfile1:2:X1_L2\n" .
+             \ "Xfile3:1:X3_L1\n" .
+             \ "Entering dir c\n" .
+             \ "Xfile4:2:X4_L2\n" .
+             \ "Leaving dir c\n" .
+             \ "Leaving dir Xtestdir\n"
+   set efm=%DEntering\ dir\ %f,%XLeaving\ dir\ %f,%f:%l:%m
+   cexpr lines
+   call assert_equal(11, getqflist({'size' : 0}).size)
+   call assert_equal(4, getqflist({'idx' : 0}).idx)
+   call assert_equal('X2_L2', getline('.'))
+   cnext
+   call assert_equal(6, getqflist({'idx' : 0}).idx)
+   call assert_equal('X1_L2', getline('.'))
+   cnext
+   call assert_equal(7, getqflist({'idx' : 0}).idx)
+   call assert_equal(1, line('$'))
+   call assert_equal('', getline(1))
+   cnext
+   call assert_equal(9, getqflist({'idx' : 0}).idx)
+   call assert_equal(1, line('$'))
+   call assert_equal('', getline(1))
+ 
+   set efm&
+   exe 'cd ' . save_cwd
+   call delete('Xtestdir', 'rf')
+ endfunc
+ 
  " vim: shiftwidth=2 sts=2 expandtab
*** ../vim-8.1.2309/src/version.c       2019-11-16 20:49:14.590876512 +0100
--- src/version.c       2019-11-16 21:04:43.060463848 +0100
***************
*** 743,744 ****
--- 743,746 ----
  {   /* Add new patch number below this line */
+ /**/
+     2310,
  /**/

-- 
>From "know your smileys":
 ...---...   SOS

 /// 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/201911162005.xAGK5d5w001751%40masaka.moolenaar.net.

Raspunde prin e-mail lui