diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-06-11 23:22:36 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-06-11 23:22:36 +0200 |
commit | ae3150ec8d9da4a244acffebea55416946ca23d3 (patch) | |
tree | 63e0e3ec4eaa84ea4c18d1484fd3ae4e149da526 | |
parent | 06469e979fe524ac6cb8f705ed4221aa267de11d (diff) | |
download | vim-git-ae3150ec8d9da4a244acffebea55416946ca23d3.tar.gz |
patch 7.4.1923v7.4.1923
Problem: Command line editing is not tested much.
Solution: Add tests for expanding the file name and 'wildmenu'.
-rw-r--r-- | src/testdir/Make_all.mak | 1 | ||||
-rw-r--r-- | src/testdir/test_cmdline.vim | 26 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 29 insertions, 0 deletions
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak index 59fff145f..57f8283f0 100644 --- a/src/testdir/Make_all.mak +++ b/src/testdir/Make_all.mak @@ -169,6 +169,7 @@ NEW_TESTS = test_arglist.res \ test_backspace_opt.res \ test_cdo.res \ test_channel.res \ + test_cmdline.res \ test_hardcopy.res \ test_history.res \ test_increment.res \ diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim new file mode 100644 index 000000000..69dc9cdc0 --- /dev/null +++ b/src/testdir/test_cmdline.vim @@ -0,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\<C-D>\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 diff --git a/src/version.c b/src/version.c index 39e70e57d..530e36331 100644 --- a/src/version.c +++ b/src/version.c @@ -754,6 +754,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1923, +/**/ 1922, /**/ 1921, |