forked from aniani/vim
patch 8.2.2608: character input not fully tested
Problem: Character input not fully tested. Solution: Add more tests. (Yegappan Lakshmanan, closes #7963)
This commit is contained in:
@@ -1430,6 +1430,14 @@ func Test_input_func()
|
||||
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
|
||||
|
Reference in New Issue
Block a user