To: vim_dev@googlegroups.com Subject: Patch 7.4.1923 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1923 Problem: Command line editing is not tested much. Solution: Add tests for expanding the file name and 'wildmenu'. Files: src/testdir/test_cmdline.vim, src/testdir/Make_all.mak *** ../vim-7.4.1922/src/testdir/test_cmdline.vim 2016-06-11 23:22:05.079288072 +0200 --- src/testdir/test_cmdline.vim 2016-06-11 23:18:38.681493714 +0200 *************** *** 0 **** --- 1,26 ---- + " Tests for editing the command line. + + func Test_complete_tab() + call writefile(['testfile'], 'Xtestfile') + call feedkeys(":e Xtest\t\r", "tx") + call assert_equal('testfile', getline(1)) + call delete('Xtestfile') + endfunc + + func Test_complete_list() + " We can't see the output, but at least we check the code runs properly. + call feedkeys(":e test\\r", "tx") + call assert_equal('test', expand('%:t')) + 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 *** ../vim-7.4.1922/src/testdir/Make_all.mak 2016-06-04 22:08:38.881905472 +0200 --- src/testdir/Make_all.mak 2016-06-11 22:45:41.990547894 +0200 *************** *** 169,174 **** --- 169,175 ---- test_backspace_opt.res \ test_cdo.res \ test_channel.res \ + test_cmdline.res \ test_hardcopy.res \ test_history.res \ test_increment.res \ *** ../vim-7.4.1922/src/version.c 2016-06-11 22:26:48.098557249 +0200 --- src/version.c 2016-06-11 23:22:14.295189544 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1923, /**/ -- From "know your smileys": |-P Reaction to unusually ugly C code /// 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 ///