Closed Bug 473941 Opened 16 years ago Closed 14 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: erik, Unassigned)

References

()

Details

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
Closed: 14 years ago
Resolution: --- → WORKSFORME
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.