aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-10-26 18:12:16 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-10-26 18:22:49 +0800
commit19eca77af434a609d60ea1e3d9594100df74f301 (patch)
tree6bd7bf45275e5a673d3f5e996c986875f514dbd3
parenta0ade77353f23a41e04ef20064577e14814fb386 (diff)
downloadrneovim-19eca77af434a609d60ea1e3d9594100df74f301.tar.gz
rneovim-19eca77af434a609d60ea1e3d9594100df74f301.tar.bz2
rneovim-19eca77af434a609d60ea1e3d9594100df74f301.zip
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) https://github.com/vim/vim/commit/272ca95fc3d21ae1e2626a7aec38a6990e88ad6b Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--src/nvim/testdir/test_functions.vim17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index 50005c6c37..8b30c53178 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -2038,15 +2038,10 @@ func Test_range()
call assert_equal(1, index(range(1, 5), 2))
" inputlist()
- " call test_feedinput("1\<CR>")
- call nvim_input('1<CR>')
- call assert_equal(1, inputlist(range(10)))
- " call test_feedinput("1\<CR>")
- call nvim_input('1<CR>')
- call assert_equal(1, inputlist(range(3, 10)))
-
- " call assert_equal('[0,1,2,3]', json_encode(range(4)))
- 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))
@@ -2059,6 +2054,10 @@ 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)))
+ 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)))