vim-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 vim/vim#5702)
578fe947e3

Cherry-pick Test_Ex_global() from patch 8.2.0293.
Test_rightleftcmd() fails if incsearch is enabled, so disable it.
This commit is contained in:
zeertzjq
2022-07-08 21:13:30 +08:00
parent 0d0a6aff6b
commit cf4aa6095f
6 changed files with 202 additions and 6 deletions

View File

@@ -1218,6 +1218,16 @@ func Test_input_func()
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()
func Test_inputlist()
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>1\<cr>", 'tx')