unlet g:caught
lines =<< trim END
- echo searchpair("a", "b", "c", "d", "1", "f")
+ echo searchpair("a", "b", "c", "d", "f", 33)
END
- CheckDefAndScriptFailure2(lines, 'E1001:', 'E475:')
+ CheckDefAndScriptFailure2(lines, 'E1001: Variable not found: f', 'E475: Invalid argument: d')
+
+ lines =<< trim END
+ def TestPair()
+ echo searchpair("a", "b", "c", "d", "1", "f")
+ enddef
+ defcompile
+ END
+ CheckScriptSuccess(lines)
bwipe!
enddef
return FAIL;
++*argcount;
- if (is_searchpair && *argcount >= 5
+ if (is_searchpair && *argcount == 5
&& cctx->ctx_instr.ga_len == instr_count + 1)
{
isn_T *isn = ((isn_T *)cctx->ctx_instr.ga_data) + instr_count;