1
0
forked from aniani/vim

patch 8.2.4366: not enough tests for command line completion

Problem:    Not enough tests for command line completion.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #9760)
This commit is contained in:
Yegappan Lakshmanan
2022-02-13 11:45:09 +00:00
committed by Bram Moolenaar
parent cdf0485969
commit 4d03d87000
4 changed files with 61 additions and 0 deletions

View File

@@ -384,6 +384,17 @@ func Test_CmdCompletion()
com! -nargs=? -complete=custom,min DoCmd
call assert_fails("call feedkeys(':DoCmd \t', 'tx')", 'E118:')
" custom completion for a pattern with a backslash
let g:ArgLead = ''
func! CustCompl(A, L, P)
let g:ArgLead = a:A
return ['one', 'two', 'three']
endfunc
com! -nargs=? -complete=customlist,CustCompl DoCmd
call feedkeys(":DoCmd a\\\t", 'xt')
call assert_equal('a\', g:ArgLead)
delfunc CustCompl
delcom DoCmd
endfunc