Mercurial > vim
diff src/testdir/test_cmdline.vim @ 22967:47a5349168ea v8.2.2030
patch 8.2.2030: some tests fail on Mac
Commit: https://github.com/vim/vim/commit/4b2ce1297e6e991bf6a674f9465d26d28e648de7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Nov 21 21:41:41 2020 +0100
patch 8.2.2030: some tests fail on Mac
Problem: Some tests fail on Mac.
Solution: Avoid Mac test failures. Add additional test for wildmenu.
(Yegappan Lakshmanan, closes #7341)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 21 Nov 2020 21:45:03 +0100 |
parents | 7060df0b8ebf |
children | 68df9697667a |
line wrap: on
line diff
--- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -84,7 +84,7 @@ func Test_complete_wildmenu() call delete('Xdir1', 'd') set nowildmenu endfunc -f + func Test_wildmenu_screendump() CheckScreendump @@ -112,7 +112,6 @@ func Test_wildmenu_screendump() call delete('XTest_wildmenu') endfunc - func Test_map_completion() CheckFeature cmdline_compl call feedkeys(":map <unique> <si\<Tab>\<Home>\"\<CR>", 'xt') @@ -1631,4 +1630,34 @@ func Test_read_shellcmd() endif endfunc +" Test for going up and down the directory tree using 'wildmenu' +func Test_wildmenu_dirstack() + CheckUnix + %bw! + call mkdir('Xdir1/dir2/dir3', 'p') + call writefile([], 'Xdir1/file1_1.txt') + call writefile([], 'Xdir1/file1_2.txt') + call writefile([], 'Xdir1/dir2/file2_1.txt') + call writefile([], 'Xdir1/dir2/file2_2.txt') + call writefile([], 'Xdir1/dir2/dir3/file3_1.txt') + call writefile([], 'Xdir1/dir2/dir3/file3_2.txt') + cd Xdir1/dir2/dir3 + set wildmenu + + call feedkeys(":e \<Tab>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e file3_1.txt', @:) + call feedkeys(":e \<Tab>\<Up>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e ../dir3/', @:) + call feedkeys(":e \<Tab>\<Up>\<Up>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e ../../dir2/', @:) + call feedkeys(":e \<Tab>\<Up>\<Up>\<Down>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e ../../dir2/dir3/', @:) + call feedkeys(":e \<Tab>\<Up>\<Up>\<Down>\<Down>\<C-B>\"\<CR>", 'xt') + call assert_equal('"e ../../dir2/dir3/file3_1.txt', @:) + + cd - + call delete('Xdir1', 'rf') + set wildmenu& +endfunc + " vim: shiftwidth=2 sts=2 expandtab