1
0
forked from aniani/vim

patch 8.2.0163: test hangs on MS-Windows console

Problem:    Test hangs on MS-Windows console.
Solution:   use feedkeys() instead of test_feedinput(). (Ken Takata)
This commit is contained in:
Bram Moolenaar
2020-01-28 20:49:11 +01:00
parent 7d8ea0b241
commit 272ca95fc3
3 changed files with 15 additions and 6 deletions

View File

@@ -1844,12 +1844,10 @@ func Test_range()
call assert_equal(1, index(range(1, 5), 2))
" inputlist()
call test_feedinput("1\<CR>")
call assert_equal(1, inputlist(range(10)))
call test_feedinput("1\<CR>")
call assert_equal(1, inputlist(range(3, 10)))
call assert_equal('[0,1,2,3]', json_encode(range(4)))
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()
call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42))
@@ -1862,6 +1860,9 @@ func Test_range()
" join()
call assert_equal('0 1 2 3 4', join(range(5)))
" json_encode()
call assert_equal('[0,1,2,3]', json_encode(range(4)))
" len()
call assert_equal(0, len(range(0)))
call assert_equal(2, len(range(2)))