unittests: Add tests for tv_list_find*() functions

Additional modifications:

- More `const` qualifiers in tested functions.
- `tv_list_find_str()` second argument is more in-line with other
  `tv_list_find*()` functions.
This commit is contained in:
ZyX
2016-11-04 19:33:36 +03:00
parent b3672ae2fc
commit e5edf07ec4
5 changed files with 204 additions and 8 deletions

View File

@@ -8424,7 +8424,7 @@ eval_vars (
return NULL;
}
result = (char_u *)tv_list_find_str(get_vim_var_list(VV_OLDFILES),
(long)i);
i - 1);
if (result == NULL) {
*errormsg = (char_u *)"";
return NULL;