To: vim_dev@googlegroups.com Subject: Patch 8.2.0163 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.0163 Problem: Test hangs on MS-Windows console. Solution: use feedkeys() instead of test_feedinput(). (Ken Takata) Files: src/testdir/test_functions.vim, src/testing.c *** ../vim-8.2.0162/src/testdir/test_functions.vim 2020-01-27 23:01:26.503445953 +0100 --- src/testdir/test_functions.vim 2020-01-28 20:44:54.748044284 +0100 *************** *** 1844,1855 **** call assert_equal(1, index(range(1, 5), 2)) " inputlist() ! call test_feedinput("1\") ! call assert_equal(1, inputlist(range(10))) ! call test_feedinput("1\") ! call assert_equal(1, inputlist(range(3, 10))) ! ! call assert_equal('[0,1,2,3]', json_encode(range(4))) " insert() call assert_equal([42, 1, 2, 3, 4, 5], insert(range(1, 5), 42)) --- 1844,1853 ---- call assert_equal(1, index(range(1, 5), 2)) " 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)) *************** *** 1862,1867 **** --- 1860,1868 ---- " 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))) *** ../vim-8.2.0162/src/testing.c 2020-01-26 15:52:33.023833239 +0100 --- src/testing.c 2020-01-28 20:46:04.720074235 +0100 *************** *** 640,645 **** --- 640,651 ---- #ifdef USE_INPUT_BUF char_u *val = tv_get_string_chk(&argvars[0]); + # ifdef VIMDLL + // this doesn't work in the console + if (!gui.in_use) + return; + # endif + if (val != NULL) { trash_input_buf(); *** ../vim-8.2.0162/src/version.c 2020-01-27 23:01:26.503445953 +0100 --- src/version.c 2020-01-28 20:48:36.308315108 +0100 *************** *** 744,745 **** --- 744,747 ---- { /* Add new patch number below this line */ + /**/ + 163, /**/ -- An operatingsystem is just a name you give to the rest of bloating idiosyncratic machine-based-features you left out of your editor. (author unknown) /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///