W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2015

[Bug 29029] New: serialize-json-004 assumes too much about indent white space

From: <nobody@w3.org>
Date: Wed, 05 Aug 2015 19:05:09 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29029-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29029

            Bug ID: 29029
           Summary: serialize-json-004 assumes too much about indent white
                    space
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery 3 & XPath 3 Test Suite
          Assignee: oneil@saxonica.com
          Reporter: josh.spiegel@oracle.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---
             Group: XSLXQuery_WG

<test-case name="serialize-json-004" ...>
   <created by="Debbie Lockett, Saxonica" on="2015-06-23"/>
   <test><![CDATA[let $params := map {
            "method" : "json",
            "indent" : true() 
            }          
            return serialize($params, $params)
   ]]></test>
   <result>
     <all-of>
       <assert-type>xs:string</assert-type>
       <assert>contains($result,'"method":"json"')</assert>
       <assert>contains($result,'"indent":true')</assert>
     </all-of>
   </result>
</test-case>

Some processors may insert white space around the colons.  e.g.

 {
    "indent" : true,
    "method" : "json"
 }

This would cause the second two assertions of this test to fail.  Can we change
it to something like this?

   <result>
     <all-of>
       <assert-type>xs:string</assert-type>
       <assert>parse-json($result)("method") eq "json"</assert>
       <assert>parse-json($result)("indent")</assert>
     </all-of>
   </result>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 5 August 2015 19:05:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:55 UTC