jscript: Fixed parsing /=/ regexp.
This commit is contained in:
parent
353553e0aa
commit
114a439fed
@ -963,8 +963,7 @@ literal_t *parse_regexp(parser_ctx_t *ctx)
|
|||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
|
|
||||||
while(*ctx->ptr != '/')
|
while(*--ctx->ptr != '/');
|
||||||
ctx->ptr--;
|
|
||||||
|
|
||||||
re = ++ctx->ptr;
|
re = ++ctx->ptr;
|
||||||
while(ctx->ptr < ctx->end && *ctx->ptr != '/') {
|
while(ctx->ptr < ctx->end && *ctx->ptr != '/') {
|
||||||
|
@ -580,4 +580,7 @@ ok(i === 1, "String.prototype.seatch.apply(obj, 'b') = " + i);
|
|||||||
i = " undefined ".search();
|
i = " undefined ".search();
|
||||||
ok(i === null, "' undefined '.search() = " + i);
|
ok(i === null, "' undefined '.search() = " + i);
|
||||||
|
|
||||||
|
tmp = "=)".replace(/=/, "?");
|
||||||
|
ok(tmp === "?)", "'=)'.replace(/=/, '?') = " + tmp);
|
||||||
|
|
||||||
reportSuccess();
|
reportSuccess();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user