diff options
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index ba3c50878..c3a6425b8 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -1829,6 +1829,29 @@ func Test_wildmode() let &encoding = save_encoding endfunc +func Test_custom_complete_autoload() + call mkdir('Xdir/autoload', 'p') + let save_rtp = &rtp + exe 'set rtp=' .. getcwd() .. '/Xdir' + let lines =<< trim END + func vim8#Complete(a, c, p) + return "oneA\noneB\noneC" + endfunc + END + call writefile(lines, 'Xdir/autoload/vim8.vim') + + command -nargs=1 -complete=custom,vim8#Complete MyCmd + set nowildmenu + set wildmode=full,list + call feedkeys(":MyCmd \<C-A>\<C-B>\"\<CR>", 'xt') + call assert_equal('"MyCmd oneA oneB oneC', @:) + + let &rtp = save_rtp + set wildmode& wildmenu& + delcommand MyCmd + call delete('Xdir', 'rf') +endfunc + " Test for interrupting the command-line completion func Test_interrupt_compl() func F(lead, cmdl, p) |