To: vim_dev@googlegroups.com Subject: Patch 8.2.4892 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.4892 Problem: Test failures because of changed error messages. Solution: Adjust the exptected error messages. Files: src/testdir/test_vim9_assign.vim, src/testdir/test_vim9_builtin.vim, src/testdir/test_vim9_expr.vim, src/testdir/test_vim9_func.vim, src/testdir/test_vim9_script.vim, src/testdir/test_expand.vim, src/testdir/test_tcl.vim, src/testdir/test_vimscript.vim *** ../vim-8.2.4891/src/testdir/test_vim9_assign.vim 2022-05-06 14:29:04.637209906 +0100 --- src/testdir/test_vim9_assign.vim 2022-05-06 17:38:23.274402150 +0100 *************** *** 293,299 **** var ls: list = [] ls[-1] ..= 'foo' END ! v9.CheckDefExecAndScriptFailure(lines, 'E684: list index out of range: -1', 2) enddef def Test_assign_register() --- 293,299 ---- var ls: list = [] ls[-1] ..= 'foo' END ! v9.CheckDefExecAndScriptFailure(lines, 'E684: List index out of range: -1', 2) enddef def Test_assign_register() *************** *** 1641,1647 **** l[g:idx : 1] = [0] echo l END ! v9.CheckDefExecAndScriptFailure(lines, 'E684: list index out of range: 3') lines =<< trim END var l = [1, 2] --- 1641,1647 ---- l[g:idx : 1] = [0] echo l END ! v9.CheckDefExecAndScriptFailure(lines, 'E684: List index out of range: 3') lines =<< trim END var l = [1, 2] *** ../vim-8.2.4891/src/testdir/test_vim9_builtin.vim 2022-05-06 11:21:13.961097837 +0100 --- src/testdir/test_vim9_builtin.vim 2022-05-06 17:40:29.914210706 +0100 *************** *** 2157,2163 **** CheckFeature job else v9.CheckDefAndScriptFailure(['job_getchannel("a")'], ['E1013: Argument 1: type mismatch, expected job but got string', 'E1218: Job required for argument 1']) ! assert_fails('job_getchannel(test_null_job())', 'E916: not a valid job') endif enddef --- 2157,2163 ---- CheckFeature job else v9.CheckDefAndScriptFailure(['job_getchannel("a")'], ['E1013: Argument 1: type mismatch, expected job but got string', 'E1218: Job required for argument 1']) ! assert_fails('job_getchannel(test_null_job())', 'E916: Not a valid job') endif enddef *************** *** 2166,2172 **** CheckFeature job else v9.CheckDefAndScriptFailure(['job_info("a")'], ['E1013: Argument 1: type mismatch, expected job but got string', 'E1218: Job required for argument 1']) ! assert_fails('job_info(test_null_job())', 'E916: not a valid job') endif enddef --- 2166,2172 ---- CheckFeature job else v9.CheckDefAndScriptFailure(['job_info("a")'], ['E1013: Argument 1: type mismatch, expected job but got string', 'E1218: Job required for argument 1']) ! assert_fails('job_info(test_null_job())', 'E916: Not a valid job') endif enddef *************** *** 4071,4078 **** assert_equal('AX234', res) if has('job') ! assert_fails('"text"->substitute(".*", () => test_null_job(), "")', 'E908: using an invalid value as a String: job') ! assert_fails('"text"->substitute(".*", () => test_null_channel(), "")', 'E908: using an invalid value as a String: channel') endif v9.CheckDefAndScriptFailure(['substitute(1, "b", "1", "d")'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1']) v9.CheckDefAndScriptFailure(['substitute("a", 2, "1", "d")'], ['E1013: Argument 2: type mismatch, expected string but got number', 'E1174: String required for argument 2']) --- 4071,4078 ---- assert_equal('AX234', res) if has('job') ! assert_fails('"text"->substitute(".*", () => test_null_job(), "")', 'E908: Using an invalid value as a String: job') ! assert_fails('"text"->substitute(".*", () => test_null_channel(), "")', 'E908: Using an invalid value as a String: channel') endif v9.CheckDefAndScriptFailure(['substitute(1, "b", "1", "d")'], ['E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1']) v9.CheckDefAndScriptFailure(['substitute("a", 2, "1", "d")'], ['E1013: Argument 2: type mismatch, expected string but got number', 'E1174: String required for argument 2']) *** ../vim-8.2.4891/src/testdir/test_vim9_expr.vim 2022-04-27 17:54:20.151363237 +0100 --- src/testdir/test_vim9_expr.vim 2022-05-06 17:41:22.410136725 +0100 *************** *** 3114,3120 **** v9.CheckDefExecAndScriptFailure(['echo g:testblob[2]'], 'E979:', 1) v9.CheckDefExecAndScriptFailure(['echo g:testblob[-3]'], 'E979:', 1) ! v9.CheckDefExecAndScriptFailure(['echo g:testlist[4]'], 'E684: list index out of range: 4', 1) v9.CheckDefExecAndScriptFailure(['echo g:testlist[-5]'], 'E684:', 1) v9.CheckDefExecAndScriptFailure(['echo g:testdict["a" : "b"]'], 'E719:', 1) --- 3114,3120 ---- v9.CheckDefExecAndScriptFailure(['echo g:testblob[2]'], 'E979:', 1) v9.CheckDefExecAndScriptFailure(['echo g:testblob[-3]'], 'E979:', 1) ! v9.CheckDefExecAndScriptFailure(['echo g:testlist[4]'], 'E684: List index out of range: 4', 1) v9.CheckDefExecAndScriptFailure(['echo g:testlist[-5]'], 'E684:', 1) v9.CheckDefExecAndScriptFailure(['echo g:testdict["a" : "b"]'], 'E719:', 1) *** ../vim-8.2.4891/src/testdir/test_vim9_func.vim 2022-04-09 11:09:03.526052266 +0100 --- src/testdir/test_vim9_func.vim 2022-05-06 17:44:46.065873323 +0100 *************** *** 3709,3715 **** var buf = g:RunVimInTerminal('-S XTest_opfunc_error', {rows: 6, wait_for_ruler: 0}) g:WaitForAssert(() => assert_match('Press ENTER', term_getline(buf, 6))) ! g:WaitForAssert(() => assert_match('E684: list index out of range: 0', term_getline(buf, 5))) # clean up g:StopVimInTerminal(buf) --- 3709,3715 ---- var buf = g:RunVimInTerminal('-S XTest_opfunc_error', {rows: 6, wait_for_ruler: 0}) g:WaitForAssert(() => assert_match('Press ENTER', term_getline(buf, 6))) ! g:WaitForAssert(() => assert_match('E684: List index out of range: 0', term_getline(buf, 5))) # clean up g:StopVimInTerminal(buf) *** ../vim-8.2.4891/src/testdir/test_vim9_script.vim 2022-05-06 13:37:39.315678663 +0100 --- src/testdir/test_vim9_script.vim 2022-05-06 17:41:49.918099074 +0100 *************** *** 1527,1533 **** source Xtestscript.vim catch /E684/ # function name should contain every time ! assert_match('E684: list index out of range', v:exception) assert_match('function \d\+_Func, line 1', v:throwpoint) endtry endfor --- 1527,1533 ---- source Xtestscript.vim catch /E684/ # function name should contain every time ! assert_match('E684: List index out of range', v:exception) assert_match('function \d\+_Func, line 1', v:throwpoint) endtry endfor *** ../vim-8.2.4891/src/testdir/test_expand.vim 2022-04-14 15:39:39.281754582 +0100 --- src/testdir/test_expand.vim 2022-05-06 17:43:03.858001303 +0100 *************** *** 141,147 **** if RunVim([], [], '--clean -s Xscript') call assert_equal([ \ 'E1274: No script file name to substitute for "