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)
diff --git a/src/testdir/test_usercommands.vim b/src/testdir/test_usercommands.vim
index 331e55f..d6ac965 100644
--- a/src/testdir/test_usercommands.vim
+++ b/src/testdir/test_usercommands.vim
@@ -384,6 +384,17 @@
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