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'])\1\", 'tx') + call assert_equal(1, c) + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\2\", 'tx') + call assert_equal(2, c) + call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\3\", '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.