summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0204
blob: 1f77666734fa748f8540584b5678b542eef3a89a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0204
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0204
Problem:    inputlist() is not tested.
Solution:   Add a test. (Dominique Pelle, closes #3240)
Files:      src/testdir/test_functions.vim


*** ../vim-8.1.0203/src/testdir/test_functions.vim	2018-07-15 20:24:25.827299588 +0200
--- src/testdir/test_functions.vim	2018-07-22 19:33:58.235966937 +0200
***************
*** 810,815 ****
--- 810,826 ----
    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.
*** ../vim-8.1.0203/src/version.c	2018-07-22 07:31:04.742472292 +0200
--- src/version.c	2018-07-22 19:35:05.935590559 +0200
***************
*** 795,796 ****
--- 795,798 ----
  {   /* Add new patch number below this line */
+ /**/
+     204,
  /**/

-- 
DINGO: Wicked wicked Zoot ... she is a bad person and she must pay the
       penalty.  And here in Castle Anthrax, we have but one punishment
       ... you must tie her down on a bed ... and spank her.  Come!
GIRLS: A spanking!  A spanking!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///