Problem: Vim9: index() does not take "true" as argument.
Solution: Use tv_get_bool_chk(). (closes #6823)
item = list_find(l, (long)tv_get_number_chk(&argvars[2], &error));
idx = l->lv_u.mat.lv_idx;
if (argvars[3].v_type != VAR_UNKNOWN)
- ic = (int)tv_get_number_chk(&argvars[3], &error);
+ ic = (int)tv_get_bool_chk(&argvars[3], &error);
if (error)
item = NULL;
}
assert_equal(0, count('ABC ABC ABC', 'b', false))
enddef
+def Test_index()
+ assert_equal(3, index(['a', 'b', 'a', 'B'], 'b', 2, true))
+enddef
+
def Test_expand()
split SomeFile
assert_equal(['SomeFile'], expand('%', true, true))
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1576,
/**/
1575,
/**/