jscript: Implicitly turn CC on for @if instruction.

This commit is contained in:
Jacek Caban 2014-10-01 10:45:37 +02:00 committed by Alexandre Julliard
parent 8b36388797
commit fcd9817581
2 changed files with 9 additions and 0 deletions

View File

@ -1051,6 +1051,9 @@ static int cc_token(parser_ctx_t *ctx, void *lval)
}
if(!check_keyword(ctx, ifW, NULL)) {
if(!init_cc(ctx))
return -1;
if(!skip_spaces(ctx) || *ctx->ptr != '(')
return lex_error(ctx, JS_E_MISSING_LBRACKET);

View File

@ -2185,6 +2185,12 @@ static BOOL run_tests(void)
parse_script_a("@set @t=2\nok(@t === 2, '@t = ' + @t);");
SET_EXPECT(global_success_d);
SET_EXPECT(global_success_i);
parse_script_a("@if(true)\nif(@_jscript) reportSuccess();\n@end");
CHECK_CALLED(global_success_d);
CHECK_CALLED(global_success_i);
run_from_res("lang.js");
run_from_res("api.js");
run_from_res("regexp.js");