Skip to content

Commit 947b39e

Browse files
committed
patch 8.1.0204: inputlist() is not tested
Problem: inputlist() is not tested. Solution: Add a test. (Dominique Pelle, closes #3240)
1 parent 578333b commit 947b39e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/testdir/test_functions.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,17 @@ func Test_col()
810810
bw!
811811
endfunc
812812

813+
func Test_inputlist()
814+
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>1\<cr>", 'tx')
815+
call assert_equal(1, c)
816+
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>2\<cr>", 'tx')
817+
call assert_equal(2, c)
818+
call feedkeys(":let c = inputlist(['Select color:', '1. red', '2. green', '3. blue'])\<cr>3\<cr>", 'tx')
819+
call assert_equal(3, c)
820+
821+
call assert_fails('call inputlist("")', 'E686:')
822+
endfunc
823+
813824
func Test_balloon_show()
814825
if has('balloon_eval')
815826
" This won't do anything but must not crash either.

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,8 @@ static char *(features[]) =
793793

794794
static int included_patches[] =
795795
{ /* Add new patch number below this line */
796+
/**/
797+
204,
796798
/**/
797799
203,
798800
/**/

0 commit comments

Comments
 (0)