Skip to content

Commit 7bdcba0

Browse files
committed
patch 9.0.1129: sporadic Test_range() failure
Problem: Sporadic Test_range() failure. Solution: Clear typeahead. Move to a separate function. (issue #22771)
1 parent 993dbc3 commit 7bdcba0

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

src/testdir/test_functions.vim

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,19 @@ func Test_inputlist()
16221622
call assert_fails('call inputlist(test_null_list())', 'E686:')
16231623
endfunc
16241624

1625+
func Test_range_inputlist()
1626+
" flush out any garbage left in the buffer
1627+
while getchar(0)
1628+
endwhile
1629+
1630+
call feedkeys(":let result = inputlist(range(10))\<CR>1\<CR>", 'x')
1631+
call assert_equal(1, result)
1632+
call feedkeys(":let result = inputlist(range(3, 10))\<CR>1\<CR>", 'x')
1633+
call assert_equal(1, result)
1634+
1635+
unlet result
1636+
endfunc
1637+
16251638
func Test_balloon_show()
16261639
CheckFeature balloon_eval
16271640

@@ -2550,12 +2563,6 @@ func Test_range()
25502563
call assert_equal(1, index(range(1, 5), 2))
25512564
call assert_fails("echo index([1, 2], 1, [])", 'E745:')
25522565

2553-
" inputlist()
2554-
call feedkeys(":let result = inputlist(range(10))\<CR>1\<CR>", 'x')
2555-
call assert_equal(1, result)
2556-
call feedkeys(":let result = inputlist(range(3, 10))\<CR>1\<CR>", 'x')
2557-
call assert_equal(1, result)
2558-
25592566
" insert()
25602567
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42))
25612568
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42, 0))

src/version.c

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

696696
static int included_patches[] =
697697
{ /* Add new patch number below this line */
698+
/**/
699+
1129,
698700
/**/
699701
1128,
700702
/**/

0 commit comments

Comments
 (0)