mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 9.0.1129: sporadic Test_range() failure
Problem: Sporadic Test_range() failure. Solution: Clear typeahead. Move to a separate function. (issue #22771)
This commit is contained in:
@@ -1622,6 +1622,19 @@ func Test_inputlist()
|
|||||||
call assert_fails('call inputlist(test_null_list())', 'E686:')
|
call assert_fails('call inputlist(test_null_list())', 'E686:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_range_inputlist()
|
||||||
|
" flush out any garbage left in the buffer
|
||||||
|
while getchar(0)
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
call feedkeys(":let result = inputlist(range(10))\<CR>1\<CR>", 'x')
|
||||||
|
call assert_equal(1, result)
|
||||||
|
call feedkeys(":let result = inputlist(range(3, 10))\<CR>1\<CR>", 'x')
|
||||||
|
call assert_equal(1, result)
|
||||||
|
|
||||||
|
unlet result
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_balloon_show()
|
func Test_balloon_show()
|
||||||
CheckFeature balloon_eval
|
CheckFeature balloon_eval
|
||||||
|
|
||||||
@@ -2550,12 +2563,6 @@ func Test_range()
|
|||||||
call assert_equal(1, index(range(1, 5), 2))
|
call assert_equal(1, index(range(1, 5), 2))
|
||||||
call assert_fails("echo index([1, 2], 1, [])", 'E745:')
|
call assert_fails("echo index([1, 2], 1, [])", 'E745:')
|
||||||
|
|
||||||
" inputlist()
|
|
||||||
call feedkeys(":let result = inputlist(range(10))\<CR>1\<CR>", 'x')
|
|
||||||
call assert_equal(1, result)
|
|
||||||
call feedkeys(":let result = inputlist(range(3, 10))\<CR>1\<CR>", 'x')
|
|
||||||
call assert_equal(1, result)
|
|
||||||
|
|
||||||
" insert()
|
" insert()
|
||||||
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42))
|
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42))
|
||||||
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42, 0))
|
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42, 0))
|
||||||
|
@@ -695,6 +695,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 */
|
||||||
|
/**/
|
||||||
|
1129,
|
||||||
/**/
|
/**/
|
||||||
1128,
|
1128,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user