[Webkit-unassigned] [Bug 16696] New: JSCRE fails fails to match Acid3 regexp

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 1 01:46:04 PST 2008


           Summary: JSCRE fails fails to match Acid3 regexp
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: eric at webkit.org
                CC: darin at apple.com

JSCRE fails fails to match Acid3 regexp

This is the assert we fail:
assert(x == 4, "/(\\3)(\\1)(a)/ failed to match 'cat'");

I'm really not sure why that assert is valid in the first place.

    function () {
      // test 86: Regular Expressions
      var ok = true;
      try {
        // JS regexps aren't like Perl regexps, if their character
        // classes start with a ] that means they're empty. So this
        // is a syntax error; if we get here it's a bug.
        ok = false;
      } catch (e) { }
      assert(ok, "orphaned bracket not considered parse error in regular
expression literal");
      try {
        if (eval("/[]/.exec('')"))
          ok = false;
      } catch (e) {
        ok = false;
      assert(ok, "/[]/ either failed to parse or matched something");
      var x = /(\3)(\1)(a)/.exec('cat');
      assert(x == 4, "/(\\3)(\\1)(a)/ failed to match 'cat'");
      assert(x.length == 4, "/(\\3)(\\1)(a)/ failed to return four
      assert(x[0] == "a", "/(\\3)(\\1)(a)/ failed to find 'a' in 'cat'");
      assert(x[1] == "", "/(\\3)(\\1)(a)/ failed to find '' in 'cat' as first
      assert(x[2] == "", "/(\\3)(\\1)(a)/ failed to find '' in 'cat' as second
      assert(x[3] == "a", "/(\\3)(\\1)(a)/ failed to find 'a' in 'cat' as third
      return 6;

Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list