W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2013

[Bug 21425] New: possible regex error in test cases from "fn-matches.re"

From: <bugzilla@jessica.w3.org>
Date: Thu, 28 Mar 2013 16:40:32 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-21425-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21425

            Bug ID: 21425
           Summary: possible regex error in test cases from
                    "fn-matches.re"
    Classification: Unclassified
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: spungi@gmail.com
        QA Contact: public-qt-comments@w3.org

The test case "re00056" is:

    (every $s in tokenize('', ',')
      satisfies matches($s, '^(?:[^a-d-b-c])$'))
    and
    (every $s in tokenize('a-b,c-c,ab,cc', ',')
      satisfies not(matches($s, '^(?:[^a-d-b-c])$')))

The regular expression [^a-d-b-c] seems wrong. The "a-d" means "'a' through
'd', i.e., abcd, and the "b-c" means "'b' through 'c', i.e., "bc". However, the
'-' between the 'd' and 'b' makes no sense. It can't mean "'d' through 'b'"
since 'b' is less than 'd', nor can it mean "a-d without 'b' and without 'c',"
i.e., range subtraction per
<http://www.w3.org/TR/xmlschema-2/#nt-charClassSub>.

Similarly, the test case "re00086" is:

    (every $s in tokenize(',a-1x-7,c-4z-9,a-1z-8a-1z-9,a1z-9,a-1z8,a-1,z-9',
',')
      satisfies matches($s, '^(?:[a-c-1-4x-z-7-9]*)$'))
    and
    (every $s in tokenize('', ',')
      satisfies not(matches($s, '^(?:[a-c-1-4x-z-7-9]*)$')))

The regular expression [a-c-1-4x-z-7-9] seems wrong for the same reason.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 28 March 2013 16:40:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:52 UTC