Mercurial > vim
comparison src/testdir/test_functions.vim @ 19209:b780229f5792 v8.2.0163
patch 8.2.0163: test hangs on MS-Windows console
Commit: https://github.com/vim/vim/commit/272ca95fc3d21ae1e2626a7aec38a6990e88ad6b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 28 20:49:11 2020 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 28 Jan 2020 21:00:04 +0100 |
parents | f92ccb8ca489 |
children | c53dbbf3229b |
comparison
equal
deleted
inserted
replaced
19208:f3dd340940a6 | 19209:b780229f5792 |
---|---|
1842 | 1842 |
1843 " index() | 1843 " index() |
1844 call assert_equal(1, index(range(1, 5), 2)) | 1844 call assert_equal(1, index(range(1, 5), 2)) |
1845 | 1845 |
1846 " inputlist() | 1846 " inputlist() |
1847 call test_feedinput("1\<CR>") | 1847 call feedkeys(":let result = inputlist(range(10))\<CR>1\<CR>", 'x') |
1848 call assert_equal(1, inputlist(range(10))) | 1848 call assert_equal(1, result) |
1849 call test_feedinput("1\<CR>") | 1849 call feedkeys(":let result = inputlist(range(3, 10))\<CR>1\<CR>", 'x') |
1850 call assert_equal(1, inputlist(range(3, 10))) | 1850 call assert_equal(1, result) |
1851 | |
1852 call assert_equal('[0,1,2,3]', json_encode(range(4))) | |
1853 | 1851 |
1854 " insert() | 1852 " insert() |
1855 call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42)) | 1853 call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42)) |
1856 call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42, 0)) | 1854 call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42, 0)) |
1857 call assert_equal([1, 42, 2, 3, 4, 5], insert(range(1, 5), 42, 1)) | 1855 call assert_equal([1, 42, 2, 3, 4, 5], insert(range(1, 5), 42, 1)) |
1859 call assert_equal([1, 2, 3, 4, 42, 5], insert(range(1, 5), 42, -1)) | 1857 call assert_equal([1, 2, 3, 4, 42, 5], insert(range(1, 5), 42, -1)) |
1860 call assert_equal([1, 2, 3, 4, 5, 42], insert(range(1, 5), 42, 5)) | 1858 call assert_equal([1, 2, 3, 4, 5, 42], insert(range(1, 5), 42, 5)) |
1861 | 1859 |
1862 " join() | 1860 " join() |
1863 call assert_equal('0 1 2 3 4', join(range(5))) | 1861 call assert_equal('0 1 2 3 4', join(range(5))) |
1862 | |
1863 " json_encode() | |
1864 call assert_equal('[0,1,2,3]', json_encode(range(4))) | |
1864 | 1865 |
1865 " len() | 1866 " len() |
1866 call assert_equal(0, len(range(0))) | 1867 call assert_equal(0, len(range(0))) |
1867 call assert_equal(2, len(range(2))) | 1868 call assert_equal(2, len(range(2))) |
1868 call assert_equal(5, len(range(0, 12, 3))) | 1869 call assert_equal(5, len(range(0, 12, 3))) |