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:
committed by
Bram Moolenaar
parent
cdf0485969
commit
4d03d87000
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user