aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_functions.vim
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-07-08 21:13:30 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-07-08 23:11:12 +0800
commitcf4aa6095f7908c9c427321a1c87bc119adc136a (patch)
tree5dcf0038576254949636c167a0ec5d30d5240903 /src/nvim/testdir/test_functions.vim
parent0d0a6aff6b89e2f48455b7f2f88e0b25d0a2080d (diff)
downloadrneovim-cf4aa6095f7908c9c427321a1c87bc119adc136a.tar.gz
rneovim-cf4aa6095f7908c9c427321a1c87bc119adc136a.tar.bz2
rneovim-cf4aa6095f7908c9c427321a1c87bc119adc136a.zip
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) https://github.com/vim/vim/commit/578fe947e3ad0cc7313c798cf76cc43dbf9b4ea6 Cherry-pick Test_Ex_global() from patch 8.2.0293. Test_rightleftcmd() fails if incsearch is enabled, so disable it.
Diffstat (limited to 'src/nvim/testdir/test_functions.vim')
-rw-r--r--src/nvim/testdir/test_functions.vim10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 2391b4a485..3feb4d5f7f 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -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')