1
0
forked from aniani/vim

patch 8.2.3456: Vim9: not all functions are tested with empty string argument

Problem:    Vim9: Not all functions are tested with an empty string argument.
Solution:   Add tests with empty strings. (Yegappan Lakshmanan, closes #8915)
This commit is contained in:
Yegappan Lakshmanan
2021-09-26 19:04:05 +01:00
committed by Bram Moolenaar
parent 56858e4ed4
commit f8dbd58666
3 changed files with 81 additions and 5 deletions

View File

@@ -9647,9 +9647,8 @@ f_synIDattr(typval_T *argvars UNUSED, typval_T *rettv)
if (in_vim9script()
&& (check_for_number_arg(argvars, 0) == FAIL
|| (check_for_string_arg(argvars, 1) == FAIL
|| (argvars[1].v_type != VAR_UNKNOWN
&& check_for_opt_string_arg(argvars, 2) == FAIL))))
|| check_for_string_arg(argvars, 1) == FAIL
|| check_for_opt_string_arg(argvars, 2) == FAIL))
return;
id = (int)tv_get_number(&argvars[0]);