# HG changeset patch # User Bram Moolenaar # Date 1672660803 -3600 # Node ID db09821e13720b1c9fbe758f140a4d5ab649eadb # Parent 626331527253af78f4d219e2b423a1bd9cdb637a patch 9.0.1129: sporadic Test_range() failure Commit: https://github.com/vim/vim/commit/7bdcba08bb5e4c39093cdedee187177d705c7cb9 Author: Bram Moolenaar Date: Mon Jan 2 11:59:26 2023 +0000 patch 9.0.1129: sporadic Test_range() failure Problem: Sporadic Test_range() failure. Solution: Clear typeahead. Move to a separate function. (issue https://github.com/vim/vim/issues/22771) diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -1622,6 +1622,19 @@ func Test_inputlist() call assert_fails('call inputlist(test_null_list())', 'E686:') endfunc +func Test_range_inputlist() + " flush out any garbage left in the buffer + while getchar(0) + endwhile + + call feedkeys(":let result = inputlist(range(10))\1\", 'x') + call assert_equal(1, result) + call feedkeys(":let result = inputlist(range(3, 10))\1\", 'x') + call assert_equal(1, result) + + unlet result +endfunc + func Test_balloon_show() CheckFeature balloon_eval @@ -2550,12 +2563,6 @@ func Test_range() call assert_equal(1, index(range(1, 5), 2)) call assert_fails("echo index([1, 2], 1, [])", 'E745:') - " inputlist() - call feedkeys(":let result = inputlist(range(10))\1\", 'x') - call assert_equal(1, result) - call feedkeys(":let result = inputlist(range(3, 10))\1\", 'x') - call assert_equal(1, result) - " 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, 0)) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1129, +/**/ 1128, /**/ 1127,