diff options
author | Bram Moolenaar <Bram@vim.org> | 2023-05-24 21:02:24 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-05-24 21:02:24 +0100 |
commit | 097c5370ea8abab17ceb0f3bcd74f57b1655c7f7 (patch) | |
tree | 031d9928ff74a50cb4f7eb25270e13561a2d8d27 /src/testdir | |
parent | a8490a4952c320f234ae4528d4a1e812a27f3a0a (diff) |
patch 9.0.1576: users may not know what to do with an internal errorv9.0.1576
Problem: Users may not know what to do with an internal error.
Solution: Add a translated message with instructions.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_expr.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_functions.vim | 8 | ||||
-rw-r--r-- | src/testdir/test_listdict.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_vimscript.vim | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/testdir/test_expr.vim b/src/testdir/test_expr.vim index 68cbeb59d0..f7f6e65321 100644 --- a/src/testdir/test_expr.vim +++ b/src/testdir/test_expr.vim @@ -25,7 +25,7 @@ func Test_equal() call assert_fails('echo base.method > instance.method') call assert_equal(0, test_null_function() == function('min')) call assert_equal(1, test_null_function() == test_null_function()) - call assert_fails('eval 10 == test_unknown()', 'E685:') + call assert_fails('eval 10 == test_unknown()', ['E340:', 'E685:']) endfunc func Test_version() diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim index 8664724b5c..17a87d85e0 100644 --- a/src/testdir/test_functions.vim +++ b/src/testdir/test_functions.vim @@ -82,15 +82,15 @@ func Test_empty() call assert_equal(0, empty(function('Test_empty'))) call assert_equal(0, empty(function('Test_empty', [0]))) - call assert_fails("call empty(test_void())", 'E685:') - call assert_fails("call empty(test_unknown())", 'E685:') + call assert_fails("call empty(test_void())", ['E340:', 'E685:']) + call assert_fails("call empty(test_unknown())", ['E340:', 'E685:']) endfunc func Test_test_void() call assert_fails('echo 1 == test_void()', 'E1031:') call assert_fails('echo 1.0 == test_void()', 'E1031:') - call assert_fails('let x = json_encode(test_void())', 'E685:') - call assert_fails('let x = copy(test_void())', 'E685:') + call assert_fails('let x = json_encode(test_void())', ['E340:', 'E685:']) + call assert_fails('let x = copy(test_void())', ['E340:', 'E685:']) call assert_fails('let x = copy([test_void()])', 'E1031:') endfunc diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim index 877bb80739..ac1f29b8fd 100644 --- a/src/testdir/test_listdict.vim +++ b/src/testdir/test_listdict.vim @@ -1384,7 +1384,7 @@ func Test_listdict_index() call v9.CheckLegacyAndVim9Failure(['VAR l = [1, 2, 3]', 'LET l[1.1] = 4'], ['E805:', 'E1012:', 'E805:']) call v9.CheckLegacyAndVim9Failure(['VAR l = [1, 2, 3]', 'LET l[: i] = [4, 5]'], ['E121:', 'E1001:', 'E121:']) call v9.CheckLegacyAndVim9Failure(['VAR l = [1, 2, 3]', 'LET l[: 3.2] = [4, 5]'], ['E805:', 'E1012:', 'E805:']) - call v9.CheckLegacyAndVim9Failure(['VAR t = test_unknown()', 'echo t[0]'], ['E685:', 'E909:', 'E685:']) + call v9.CheckLegacyAndVim9Failure(['VAR t = test_unknown()', 'echo t[0]'], ['E340:', 'E909:', 'E340:', 'E685:']) endfunc " Test for a null list diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim index 295a03b027..2af0800bde 100644 --- a/src/testdir/test_vimscript.vim +++ b/src/testdir/test_vimscript.vim @@ -6524,8 +6524,8 @@ func Test_type() endif call assert_equal(v:t_blob, type(test_null_blob())) - call assert_fails("call type(test_void())", 'E685:') - call assert_fails("call type(test_unknown())", 'E685:') + call assert_fails("call type(test_void())", ['E340:', 'E685:']) + call assert_fails("call type(test_unknown())", ['E340:', 'E685:']) call assert_equal(0, 0 + v:false) call assert_equal(1, 0 + v:true) |