diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-05 17:41:49 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-05 17:41:49 +0100 |
commit | 35ca0e7a1cb6e6daef8e0052a8437801226cef19 (patch) | |
tree | ce62743d4ab746c29b4a080bd44ac06f32fe00dd /src/testdir/test_packadd.vim | |
parent | 019b9c644e92742e37efc08fef47c2620a01b6b3 (diff) | |
download | vim-git-35ca0e7a1cb6e6daef8e0052a8437801226cef19.tar.gz |
patch 7.4.1492v7.4.1492
Problem: No command line completion for ":packadd".
Solution: Implement completion. (Hirohito Higashi)
Diffstat (limited to 'src/testdir/test_packadd.vim')
-rw-r--r-- | src/testdir/test_packadd.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/testdir/test_packadd.vim b/src/testdir/test_packadd.vim index aec80efd8..091fec24b 100644 --- a/src/testdir/test_packadd.vim +++ b/src/testdir/test_packadd.vim @@ -55,3 +55,24 @@ func Test_packadd_noload() packadd! mytest call assert_equal(new_rtp, &rtp) endfunc + +" Check command-line completion for 'packadd' +func Test_packadd_completion() + let optdir1 = &packpath . '/pack/mine/opt' + let optdir2 = &packpath . '/pack/candidate/opt' + + call mkdir(optdir1 . '/pluginA', 'p') + call mkdir(optdir1 . '/pluginC', 'p') + call mkdir(optdir2 . '/pluginB', 'p') + call mkdir(optdir2 . '/pluginC', 'p') + + let li = [] + call feedkeys(":packadd \<Tab>')\<C-B>call add(li, '\<CR>", 't') + call feedkeys(":packadd " . repeat("\<Tab>", 2) . "')\<C-B>call add(li, '\<CR>", 't') + call feedkeys(":packadd " . repeat("\<Tab>", 3) . "')\<C-B>call add(li, '\<CR>", 't') + call feedkeys(":packadd " . repeat("\<Tab>", 4) . "')\<C-B>call add(li, '\<CR>", 'tx') + call assert_equal("packadd pluginA", li[0]) + call assert_equal("packadd pluginB", li[1]) + call assert_equal("packadd pluginC", li[2]) + call assert_equal("packadd ", li[3]) +endfunc |