patch 8.2.2608: character input not fully tested
Problem: Character input not fully tested.
Solution: Add more tests. (Yegappan Lakshmanan, closes #7963)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 64afe54..ca57c30 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -1430,6 +1430,14 @@
delfunc Tcomplete
call assert_equal('item1 item2 item3', c)
+ " Test for using special characters as default input
+ call feedkeys(":let c = input('name? ', \"x\<BS>y\")\<CR>\<CR>", 'xt')
+ call assert_equal('y', c)
+
+ " Test for using <CR> as default input
+ call feedkeys(":let c = input('name? ', \"\\<CR>\")\<CR>x\<CR>", 'xt')
+ call assert_equal(' x', c)
+
call assert_fails("call input('F:', '', 'invalid')", 'E180:')
call assert_fails("call input('F:', '', [])", 'E730:')
endfunc