0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.0204: inputlist() is not tested

Problem:    inputlist() is not tested.
Solution:   Add a test. (Dominique Pelle, closes #3240)
This commit is contained in:
Bram Moolenaar
2018-07-22 19:36:37 +02:00
parent 578333b2ec
commit 947b39e761
2 changed files with 13 additions and 0 deletions

View File

@@ -810,6 +810,17 @@ func Test_col()
bw! bw!
endfunc 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() func Test_balloon_show()
if has('balloon_eval') if has('balloon_eval')
" This won't do anything but must not crash either. " This won't do anything but must not crash either.

View File

@@ -793,6 +793,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
204,
/**/ /**/
203, 203,
/**/ /**/