Patch 8.1.1063
Problem:    Insufficient testing for wildmenu completion.
Solution:   Extend the test case. (Dominique Pelle, closes #4182)
Files:      src/testdir/test_cmdline.vim


*** ../vim-8.1.1062/src/testdir/test_cmdline.vim        2019-01-27 
20:43:38.131329221 +0100
--- src/testdir/test_cmdline.vim        2019-03-28 21:25:45.568869400 +0100
***************
*** 14,27 ****
  endfunc
  
  func Test_complete_wildmenu()
!   call writefile(['testfile1'], 'Xtestfile1')
!   call writefile(['testfile2'], 'Xtestfile2')
    set wildmenu
!   call feedkeys(":e Xtest\t\t\r", "tx")
    call assert_equal('testfile2', getline(1))
  
!   call delete('Xtestfile1')
!   call delete('Xtestfile2')
    set nowildmenu
  endfunc
  
--- 14,61 ----
  endfunc
  
  func Test_complete_wildmenu()
!   call mkdir('Xdir1/Xdir2', 'p')
!   call writefile(['testfile1'], 'Xdir1/Xtestfile1')
!   call writefile(['testfile2'], 'Xdir1/Xtestfile2')
!   call writefile(['testfile3'], 'Xdir1/Xdir2/Xtestfile3')
!   call writefile(['testfile3'], 'Xdir1/Xdir2/Xtestfile4')
    set wildmenu
! 
!   " Pressing <Tab> completes, and moves to next files when pressing again.
!   call feedkeys(":e Xdir1/\<Tab>\<Tab>\<CR>", 'tx')
!   call assert_equal('testfile1', getline(1))
!   call feedkeys(":e Xdir1/\<Tab>\<Tab>\<Tab>\<CR>", 'tx')
!   call assert_equal('testfile2', getline(1))
! 
!   " <S-Tab> is like <Tab> but begin with the last match and then go to
!   " previous.
!   call feedkeys(":e Xdir1/Xtest\<S-Tab>\<CR>", 'tx')
    call assert_equal('testfile2', getline(1))
+   call feedkeys(":e Xdir1/Xtest\<S-Tab>\<S-Tab>\<CR>", 'tx')
+   call assert_equal('testfile1', getline(1))
+ 
+   " <Left>/<Right> to move to previous/next file.
+   call feedkeys(":e Xdir1/\<Tab>\<Right>\<CR>", 'tx')
+   call assert_equal('testfile1', getline(1))
+   call feedkeys(":e Xdir1/\<Tab>\<Right>\<Right>\<CR>", 'tx')
+   call assert_equal('testfile2', getline(1))
+   call feedkeys(":e Xdir1/\<Tab>\<Right>\<Right>\<Left>\<CR>", 'tx')
+   call assert_equal('testfile1', getline(1))
+ 
+   " <Up>/<Down> to go up/down directories.
+   call feedkeys(":e Xdir1/\<Tab>\<Down>\<CR>", 'tx')
+   call assert_equal('testfile3', getline(1))
+   call feedkeys(":e Xdir1/\<Tab>\<Down>\<Up>\<Right>\<CR>", 'tx')
+   call assert_equal('testfile1', getline(1))
  
!   " cleanup
!   %bwipe
!   call delete('Xdir1/Xdir2/Xtestfile4')
!   call delete('Xdir1/Xdir2/Xtestfile3')
!   call delete('Xdir1/Xtestfile2')
!   call delete('Xdir1/Xtestfile1')
!   call delete('Xdir1/Xdir2', 'd')
!   call delete('Xdir1', 'd')
    set nowildmenu
  endfunc
  
*** ../vim-8.1.1062/src/version.c       2019-03-28 20:31:03.416924480 +0100
--- src/version.c       2019-03-28 21:24:31.133423039 +0100
***************
*** 777,778 ****
--- 777,780 ----
  {   /* Add new patch number below this line */
+ /**/
+     1063,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
138. You develop a liking for cold coffee.

 /// 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.

Raspunde prin e-mail lui