Commit b1773131 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

jscript: Added RegExp.global getter implementation.

parent 81cb13af
......@@ -264,8 +264,10 @@ static HRESULT RegExp_set_source(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t va
static HRESULT RegExp_get_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t *r)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
*r = jsval_bool(!!(regexp_from_jsdisp(jsthis)->jsregexp->flags & REG_GLOB));
return S_OK;
}
static HRESULT RegExp_set_global(script_ctx_t *ctx, jsdisp_t *jsthis, jsval_t value)
......
......@@ -663,13 +663,18 @@ ok(/abc/.toString(1, false, "3") === "/abc/", "/abc/.toString(1, false, \"3\") =
re = /x/;
ok(re.ignoreCase === false, "re.ignoreCase = " + re.ignoreCase);
ok(re.multiline === false, "re.multiline = " + re.multiline);
ok(re.global === false, "re.global = " + re.global);
re = /x/i;
ok(re.ignoreCase === true, "re.ignoreCase = " + re.ignoreCase);
ok(re.multiline === false, "re.multiline = " + re.multiline);
ok(re.global === false, "re.global = " + re.global);
re = new RegExp("xxx", "gi");
ok(re.ignoreCase === true, "re.ignoreCase = " + re.ignoreCase);
ok(re.multiline === false, "re.multiline = " + re.multiline);
ok(re.global === true, "re.global = " + re.global);
re = /x/mg;
ok(re.ignoreCase === false, "re.ignoreCase = " + re.ignoreCase);
ok(re.multiline === true, "re.multiline = " + re.multiline);
ok(re.global === true, "re.global = " + re.global);
reportSuccess();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment