mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0204: inputlist() is not tested
Problem: inputlist() is not tested.
Solution: Add a test. (Dominique Pelle, closes vim/vim#3240)
947b39e761
This commit is contained in:
parent
047dfcd294
commit
218fccaba4
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user