0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

patch 8.2.4404: Vim9: some code not covered by tests

Problem:    Vim9: some code not covered by tests.
Solution:   Add a few specific test cases.
This commit is contained in:
Bram Moolenaar
2022-02-16 21:48:25 +00:00
parent 9437737833
commit cd1cda2f87
4 changed files with 151 additions and 0 deletions

View File

@@ -367,6 +367,16 @@ call_dfunc(
semsg(_(e_nr_arguments_too_many), -arg_to_add);
return FAIL;
}
else if (arg_to_add > ufunc->uf_def_args.ga_len)
{
int missing = arg_to_add - ufunc->uf_def_args.ga_len;
if (missing == 1)
emsg(_(e_one_argument_too_few));
else
semsg(_(e_nr_arguments_too_few), missing);
return FAIL;
}
// Reserve space for:
// - missing arguments