Empty positive lookaheads should match everywhere. The above 'URL' alerts "false" where it should have alerted "true"

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
9 years ago
7 years ago

People

(Reporter: Erik Corry, Unassigned)

Tracking

unspecified
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.18) Gecko/20081117 Firefox/2.0.0.18
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.18) Gecko/20081117 Firefox/2.0.0.18

/(?=)/.test("foo")

returns false, but the almost identical expression:

/()/.test("foo")

will correctly return true.

A very new tracemonkey build shows similar problems.

Reproducible: Always

Steps to Reproduce:
1. Enter URL:   javascript:alert(/(?=)/.test("foo"))
2.
3.
Actual Results:  
Alerts "false"

Expected Results:  
Should alert "true"
Assignee: nobody → general
Component: General → JavaScript Engine
OS: Linux → All
Product: Firefox → Core
QA Contact: general → general
Hardware: x86 → All
Test case incoming.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
http://hg.mozilla.org/tracemonkey/rev/1f533c1c78d3
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.