1
0
forked from aniani/vim

patch 8.2.0396: cmdexpand.c insufficiently tested

Problem:    Cmdexpand.c insufficiently tested.
Solution:   Add more tests. (Yegappan Lakshmanan, closes #5789)
This commit is contained in:
Bram Moolenaar
2020-03-16 21:25:24 +01:00
parent a2cbdea968
commit 24ebd83e03
5 changed files with 197 additions and 14 deletions

View File

@@ -262,7 +262,7 @@ func CustomComplete(A, L, P)
endfunc
func CustomCompleteList(A, L, P)
return [ "Monday", "Tuesday", "Wednesday" ]
return [ "Monday", "Tuesday", "Wednesday", {}]
endfunc
func Test_CmdCompletion()
@@ -327,6 +327,12 @@ func Test_CmdCompletion()
com! -complete=customlist,CustomComp DoCmd :
call assert_fails("call feedkeys(':DoCmd \<C-D>', 'tx')", 'E117:')
" custom completion without a function
com! -complete=custom, DoCmd
call assert_beeps("call feedkeys(':DoCmd \t', 'tx')")
delcom DoCmd
endfunc
func CallExecute(A, L, P)
@@ -542,3 +548,5 @@ func Test_command_list()
call assert_equal("\nNo user-defined commands found", execute(':command Xxx'))
call assert_equal("\nNo user-defined commands found", execute('command'))
endfunc
" vim: shiftwidth=2 sts=2 expandtab