summaryrefslogtreecommitdiff
path: root/src/testing.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-12-31 22:49:24 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-31 22:49:24 +0000
commit436b5adc9770a2568209dd5ab1f98bd1afc91898 (patch)
tree623dc85ee9a396b16f939f44d38138f882edc229 /src/testing.c
parentf1474d801bbdb73406dd3d1f931f515f99e86dfa (diff)
downloadvim-git-436b5adc9770a2568209dd5ab1f98bd1afc91898.tar.gz
patch 8.2.3961: error messages are spread outv8.2.3961
Problem: Error messages are spread out. Solution: Move more errors to errors.h.
Diffstat (limited to 'src/testing.c')
-rw-r--r--src/testing.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/testing.c b/src/testing.c
index 1037c44a8..782d35c5a 100644
--- a/src/testing.c
+++ b/src/testing.c
@@ -907,12 +907,12 @@ f_test_alloc_fail(typval_T *argvars, typval_T *rettv UNUSED)
|| argvars[1].v_type != VAR_NUMBER
|| argvars[1].vval.v_number < 0
|| argvars[2].v_type != VAR_NUMBER)
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
else
{
alloc_fail_id = argvars[0].vval.v_number;
if (alloc_fail_id >= aid_last)
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
alloc_fail_countdown = argvars[1].vval.v_number;
alloc_fail_repeat = argvars[2].vval.v_number;
did_outofmem_msg = FALSE;
@@ -967,7 +967,7 @@ f_test_getvalue(typval_T *argvars, typval_T *rettv)
return;
if (argvars[0].v_type != VAR_STRING)
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
else
{
char_u *name = tv_get_string(&argvars[0]);
@@ -975,7 +975,7 @@ f_test_getvalue(typval_T *argvars, typval_T *rettv)
if (STRCMP(name, (char_u *)"need_fileinfo") == 0)
rettv->vval.v_number = need_fileinfo;
else
- semsg(_(e_invarg2), name);
+ semsg(_(e_invalid_argument_str), name);
}
}
@@ -991,12 +991,12 @@ f_test_option_not_set(typval_T *argvars, typval_T *rettv UNUSED)
return;
if (argvars[0].v_type != VAR_STRING)
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
else
{
name = tv_get_string(&argvars[0]);
if (reset_option_was_set(name) == FAIL)
- semsg(_(e_invarg2), name);
+ semsg(_(e_invalid_argument_str), name);
}
}
@@ -1017,7 +1017,7 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
if (argvars[0].v_type != VAR_STRING
|| (argvars[1].v_type) != VAR_NUMBER)
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
else
{
name = tv_get_string(&argvars[0]);
@@ -1072,7 +1072,7 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
}
}
else
- semsg(_(e_invarg2), name);
+ semsg(_(e_invalid_argument_str), name);
}
}
@@ -1171,7 +1171,7 @@ f_test_ignore_error(typval_T *argvars, typval_T *rettv UNUSED)
return;
if (argvars[0].v_type != VAR_STRING)
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
else
ignore_error_for_testing(tv_get_string(&argvars[0]));
}
@@ -1264,7 +1264,7 @@ f_test_scrollbar(typval_T *argvars, typval_T *rettv UNUSED)
|| (argvars[1].v_type) != VAR_NUMBER
|| (argvars[2].v_type) != VAR_NUMBER)
{
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
return;
}
which = tv_get_string(&argvars[0]);
@@ -1279,7 +1279,7 @@ f_test_scrollbar(typval_T *argvars, typval_T *rettv UNUSED)
sb = &gui.bottom_sbar;
if (sb == NULL)
{
- semsg(_(e_invarg2), which);
+ semsg(_(e_invalid_argument_str), which);
return;
}
gui_drag_scrollbar(sb, value, dragging);
@@ -1300,7 +1300,7 @@ f_test_setmouse(typval_T *argvars, typval_T *rettv UNUSED)
if (argvars[0].v_type != VAR_NUMBER || (argvars[1].v_type) != VAR_NUMBER)
{
- emsg(_(e_invarg));
+ emsg(_(e_invalid_argument));
return;
}