Mercurial > vim
changeset 25292:eaf013720ec8 v8.2.3183
patch 8.2.3183: duplicate error numbers
Commit: https://github.com/vim/vim/commit/98c2eaed27579602e05e7b96aa3a60428a8b9cb2
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jul 19 10:38:49 2021 +0200
patch 8.2.3183: duplicate error numbers
Problem: Duplicate error numbers.
Solution: Adjust the error numbers.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 19 Jul 2021 10:45:04 +0200 |
parents | ef3222de6d9c |
children | d3f443bd2edd |
files | src/errors.h src/testdir/test_vim9_builtin.vim src/version.c |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/errors.h +++ b/src/errors.h @@ -505,6 +505,6 @@ EXTERN char e_number_required_for_argume EXTERN char e_list_required_for_argument_nr[] INIT(= N_("E1211: List required for argument %d")); EXTERN char e_bool_required_for_argument_nr[] - INIT(= N_("E1211: Bool required for argument %d")); + INIT(= N_("E1212: Bool required for argument %d")); EXTERN char e_redefining_imported_item_str[] - INIT(= N_("E1212: Redefining imported item %s")); + INIT(= N_("E1213: Redefining imported item %s"));
--- a/src/testdir/test_vim9_builtin.vim +++ b/src/testdir/test_vim9_builtin.vim @@ -478,7 +478,7 @@ def Test_char2nr() assert_fails('char2nr(true)', 'E1174:') CheckDefAndScriptFailure2(['char2nr(10)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1') - CheckDefAndScriptFailure2(['char2nr("a", 2)'], 'E1013: Argument 2: type mismatch, expected bool but got number', 'E1211: Bool required for argument 2') + CheckDefAndScriptFailure2(['char2nr("a", 2)'], 'E1013: Argument 2: type mismatch, expected bool but got number', 'E1212: Bool required for argument 2') assert_equal(97, char2nr('a', 1)) assert_equal(97, char2nr('a', 0)) assert_equal(97, char2nr('a', true)) @@ -2534,7 +2534,7 @@ enddef def Test_str2list() CheckDefAndScriptFailure2(['str2list(10)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1') - CheckDefAndScriptFailure2(['str2list("a", 2)'], 'E1013: Argument 2: type mismatch, expected bool but got number', 'E1211: Bool required for argument 2') + CheckDefAndScriptFailure2(['str2list("a", 2)'], 'E1013: Argument 2: type mismatch, expected bool but got number', 'E1212: Bool required for argument 2') assert_equal([97], str2list('a')) assert_equal([97], str2list('a', 1)) assert_equal([97], str2list('a', true)) @@ -2560,7 +2560,7 @@ enddef def Test_strchars() strchars("A\u20dd", true)->assert_equal(1) CheckDefAndScriptFailure2(['strchars(10)'], 'E1013: Argument 1: type mismatch, expected string but got number', 'E1174: String required for argument 1') - CheckDefAndScriptFailure2(['strchars("a", 2)'], 'E1013: Argument 2: type mismatch, expected bool but got number', 'E1211: Bool required for argument 2') + CheckDefAndScriptFailure2(['strchars("a", 2)'], 'E1013: Argument 2: type mismatch, expected bool but got number', 'E1212: Bool required for argument 2') assert_equal(3, strchars('abc')) assert_equal(3, strchars('abc', 1)) assert_equal(3, strchars('abc', true))