From 300490f2e8e94ee471685cd9809964c10ebdc1ed Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 1 Jul 2022 10:54:41 +0800 Subject: vim-patch:8.2.0049: command line completion not fully tested Problem: Command line completion not fully tested. Solution: Add more test cases. Make help sorting stable. (Dominique Pelle, closes vim/vim#5402) https://github.com/vim/vim/commit/297610ba4b110c918ffe60c45eb4a1d6ea2daae5 --- src/nvim/testdir/test_cd.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/testdir/test_cd.vim') diff --git a/src/nvim/testdir/test_cd.vim b/src/nvim/testdir/test_cd.vim index c364babd65..a1e53df774 100644 --- a/src/nvim/testdir/test_cd.vim +++ b/src/nvim/testdir/test_cd.vim @@ -225,6 +225,21 @@ func Test_cd_from_non_existing_dir() call assert_equal(saveddir, getcwd()) endfunc +func Test_cd_completion() + call mkdir('XComplDir1', 'p') + call mkdir('XComplDir2', 'p') + call writefile([], 'XComplFile') + + for cmd in ['cd', 'chdir', 'lcd', 'lchdir', 'tcd', 'tchdir'] + call feedkeys(':' .. cmd .. " XCompl\\\"\", 'tx') + call assert_equal('"' .. cmd .. ' XComplDir1/ XComplDir2/', @:) + endfor + + call delete('XComplDir1', 'd') + call delete('XComplDir2', 'd') + call delete('XComplFile') +endfunc + func Test_cd_unknown_dir() call mkdir('Xa') cd Xa -- cgit