aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_cd.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-01 11:49:48 +0800
committerGitHub <noreply@github.com>2022-07-01 11:49:48 +0800
commit8f5bcfb0e4ca3b827bcc46cb05d3530bd97da7db (patch)
tree0bf2bc94da24ed2c0439a1c3660c3515f6b513f1 /src/nvim/testdir/test_cd.vim
parent2268a4147ec1e9f0236fd5eb56c1cc2b751eca05 (diff)
parentb22f7dd9083293f4bef7ddf7ab8c2a20247b1629 (diff)
downloadrneovim-8f5bcfb0e4ca3b827bcc46cb05d3530bd97da7db.tar.gz
rneovim-8f5bcfb0e4ca3b827bcc46cb05d3530bd97da7db.tar.bz2
rneovim-8f5bcfb0e4ca3b827bcc46cb05d3530bd97da7db.zip
Merge pull request #19178 from zeertzjq/vim-8.2.0049
vim-patch:8.2.0049: command line completion not fully tested
Diffstat (limited to 'src/nvim/testdir/test_cd.vim')
-rw-r--r--src/nvim/testdir/test_cd.vim15
1 files changed, 15 insertions, 0 deletions
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\<C-A>\<C-B>\"\<CR>", '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