0
0
mirror of https://github.com/vim/vim.git synced 2025-10-03 05:14:07 -04:00

patch 8.2.0325: ex_getln.c code not covered by tests

Problem:    Ex_getln.c code not covered by tests.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes #5702)
This commit is contained in:
Bram Moolenaar
2020-02-27 21:32:51 +01:00
parent 12f2003871
commit 578fe947e3
6 changed files with 200 additions and 3 deletions

View File

@@ -1162,6 +1162,19 @@ func Test_input_func()
\ .. "\<C-A>\<CR>", 'xt')
delfunc Tcomplete
call assert_equal('item1 item2 item3', c)
call assert_fails("call input('F:', '', 'invalid')", 'E180:')
call assert_fails("call input('F:', '', [])", 'E730:')
endfunc
" Test for the inputdialog() function
func Test_inputdialog()
CheckNotGui
call feedkeys(":let v=inputdialog('Q:', 'xx', 'yy')\<CR>\<CR>", 'xt')
call assert_equal('xx', v)
call feedkeys(":let v=inputdialog('Q:', 'xx', 'yy')\<CR>\<Esc>", 'xt')
call assert_equal('yy', v)
endfunc
" Test for inputlist()