To: vim_dev@googlegroups.com Subject: Patch 8.1.1063 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 completes, and moves to next files when pressing again. ! call feedkeys(":e Xdir1/\\\", 'tx') ! call assert_equal('testfile1', getline(1)) ! call feedkeys(":e Xdir1/\\\\", 'tx') ! call assert_equal('testfile2', getline(1)) ! ! " is like but begin with the last match and then go to ! " previous. ! call feedkeys(":e Xdir1/Xtest\\", 'tx') call assert_equal('testfile2', getline(1)) + call feedkeys(":e Xdir1/Xtest\\\", 'tx') + call assert_equal('testfile1', getline(1)) + + " / to move to previous/next file. + call feedkeys(":e Xdir1/\\\", 'tx') + call assert_equal('testfile1', getline(1)) + call feedkeys(":e Xdir1/\\\\", 'tx') + call assert_equal('testfile2', getline(1)) + call feedkeys(":e Xdir1/\\\\\", 'tx') + call assert_equal('testfile1', getline(1)) + + " / to go up/down directories. + call feedkeys(":e Xdir1/\\\", 'tx') + call assert_equal('testfile3', getline(1)) + call feedkeys(":e Xdir1/\\\\\", '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 -- Bram@Moolenaar.net -- 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 ///