[Bug 27608] New: Regular expressions in JSON Serialization tests

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27608

            Bug ID: 27608
           Summary: Regular expressions in JSON Serialization tests
           Product: XPath / XQuery / XSLT
           Version: Working drafts
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: christian.gruen@gmail.com
        QA Contact: public-qt-comments@w3.org

I believe that the regular expressions in the tests Serialization-json-58 –
Serialization-json-72 need to be fixed, as many of them do not comply with the
XQuery syntax. In most cases, it's about closing curly and square brackets that
have not been escaped. Some other characters (parentheses, asterisk) need to be
escaped as well. Some examples:

* Serialization-json-64

Curly and square brackets:

- OLD: \{"book":\{.*"author":\[{[^}]*},{[^}]*},{[^}]*}].*}}
- NEW: \{"book":\{.*"author":\[\{[^}]*\},\{[^}]*\},\{[^}]*\}\].*\}\}

* Serialization-json-60

Parentheses:

- OLD:
\{"menu":\{.*"popup":\{"menuitem":\[\{.*"onclick":"CreateNewDoc()".*},\{.*"onclick":"OpenDoc()".*},\{.*"onclick":"CloseDoc()".*}]}.*}}
- NEW:
\{"menu":\{.*"popup":\{"menuitem":\[\{.*"onclick":"CreateNewDoc\(\)".*\},\{.*"onclick":"OpenDoc\(\)".*\},\{.*"onclick":"CloseDoc\(\)".*\}\]\}.*\}\}

* Serialization-json-67

Forward slashes (should not be escaped):

- OLD:
\{"book":\{.*"author":\[{[^}]*},{[^}]*},"<simple>2<\/simple>",{[^}]*}].*}}
- NEW:
\{"book":\{.*"author":\[\{[^}]*\},\{[^}]*\},"<simple>2</simple>",\{[^}]*\}\].*\}\}

* Serialization-json-61

Asterisks:

- OLD: "text":\{.*"onMouseUp":"sun1\.opacity = \(sun1\.opacity / 100\) *
90;".*}
- NEW: "text":\{.*"onMouseUp":"sun1\.opacity = \(sun1\.opacity / 100\) \*
90;".*\}

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 13 December 2014 17:06:01 UTC