diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-09 09:25:10 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-08-09 09:25:26 -0400 |
commit | 218fccaba4c897f294cb2f21a63fb1c76f387970 (patch) | |
tree | a059a84823091c02f548ab1709415af12a69be11 /src | |
parent | 047dfcd29406350ef85a87a9e248b7b56261bd5f (diff) | |
download | rneovim-218fccaba4c897f294cb2f21a63fb1c76f387970.tar.gz rneovim-218fccaba4c897f294cb2f21a63fb1c76f387970.tar.bz2 rneovim-218fccaba4c897f294cb2f21a63fb1c76f387970.zip |
vim-patch:8.1.0204: inputlist() is not tested
Problem: inputlist() is not tested.
Solution: Add a test. (Dominique Pelle, closes vim/vim#3240)
https://github.com/vim/vim/commit/947b39e761b8a95cc1bd37ad0c2c30552238809a
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_functions.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim index 53911382b6..754a7ca18a 100644 --- a/src/nvim/testdir/test_functions.vim +++ b/src/nvim/testdir/test_functions.vim @@ -841,6 +841,17 @@ func Test_col() bw! endfunc +func Test_inputlist() + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>1\<cr>", 'tx') + call assert_equal(1, c) + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>2\<cr>", 'tx') + call assert_equal(2, c) + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>3\<cr>", 'tx') + call assert_equal(3, c) + + call assert_fails('call inputlist("")', 'E686:') +endfunc + func Test_balloon_show() if has('balloon_eval') " This won't do anything but must not crash either. |