Skip to content

Commit

Permalink
test: generate e2e expected results using Saxon 12.4
Browse files Browse the repository at this point in the history
  • Loading branch information
AirQuick committed Dec 11, 2023
1 parent 6d923b3 commit 9bbf645
Show file tree
Hide file tree
Showing 50 changed files with 491 additions and 493 deletions.
10 changes: 4 additions & 6 deletions test/end-to-end/ant/generate-expected/worker/generate.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@
Require specific Saxon versions
-->
<xsl:template as="document-node(element(project))" match="document-node(element(project))">
<xsl:variable as="xs:integer+" name="require-ge" select="9, 9, 0, 2" />
<xsl:variable as="xs:integer+" name="require-lt" select="10" />
<!-- https://saxonica.plan.io/issues/6063 -->
<xsl:variable as="xs:integer+" name="require-ge" select="12, 3" />
<xsl:if test="
not(
($x:saxon-version ge x:pack-version($require-ge))
and
($x:saxon-version lt x:pack-version($require-lt))
$x:saxon-version ge x:pack-version($require-ge)
)">
<xsl:message terminate="yes">
<xsl:text expand-text="yes">ERROR: Saxon version is {system-property('xsl:product-version')}. To generate the expected files, Saxon version must be ge {string-join($require-ge, '.')} and lt {string-join($require-lt, '.')}. Other versions will produce unrelated changes.</xsl:text>
<xsl:text expand-text="yes">ERROR: Saxon version is {system-property('xsl:product-version')}. To generate the expected files, Saxon version must be ge {string-join($require-ge, '.')}. Other versions will produce unrelated changes.</xsl:text>
</xsl:message>
</xsl:if>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
pending="testing @focus of a Success scenario">
<label>Test @focus</label>
<input-wrap xmlns="">
<t:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:call xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="exactly-one">
<t:param select="9"/>
</t:call>
Expand Down Expand Up @@ -47,8 +47,8 @@
<test id="scenario1-scenario4-expect1" successful="false">
<label>must execute the test and return Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:expect xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
pending="force focus">
<label>Test @focus</label>
<input-wrap xmlns="">
<t:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:call xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="exactly-one">
<t:param select="9"/>
</t:call>
Expand All @@ -29,8 +29,8 @@
<test id="scenario1-scenario2-expect1" successful="false">
<label>it would return Failure if it were not Pending</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:expect xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand Down
12 changes: 6 additions & 6 deletions test/end-to-end/cases/expected/query/force-focus_none-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<scenario id="scenario1" xspec="../../focus-without-pending.xspec">
<label>Test @focus</label>
<input-wrap xmlns="">
<t:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:call xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="exactly-one">
<t:param select="9"/>
</t:call>
Expand All @@ -27,8 +27,8 @@
<test id="scenario1-scenario2-expect1" successful="false">
<label>it would return Failure if it were not Pending</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:expect xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand All @@ -48,8 +48,8 @@
<test id="scenario1-scenario4-expect1" successful="false">
<label>must execute the test and return Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
<t:expect xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand Down
6 changes: 3 additions & 3 deletions test/end-to-end/cases/expected/query/function-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<label>when a function returns 0</label>
<input-wrap xmlns="">
<t:call xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="mirror:param-mirror">
<t:param select="0"/>
</t:call>
Expand All @@ -23,8 +23,8 @@
<label>expecting xs:integer in @test must be Success</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:integer"/>
</expect-test-wrap>
<expect select="()"/>
Expand All @@ -37,8 +37,8 @@
<label>expecting xs:string in @test must be Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand Down
12 changes: 6 additions & 6 deletions test/end-to-end/cases/expected/query/import-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<label>where a function returns 0</label>
<input-wrap xmlns="">
<t:call xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="mirror:param-mirror">
<t:param select="0"/>
</t:call>
Expand All @@ -25,8 +25,8 @@
<label>expecting x:integer in @test must be Success</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:integer"/>
</expect-test-wrap>
<expect select="()"/>
Expand All @@ -39,8 +39,8 @@
<label>expecting xs:string in @test must be Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand All @@ -55,8 +55,8 @@
<label>where a function returns 0</label>
<input-wrap xmlns="">
<t:call xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="mirror:param-mirror">
<t:param select="0"/>
</t:call>
Expand All @@ -70,8 +70,8 @@
<label>expecting x:integer in @test must be Success</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:integer"/>
</expect-test-wrap>
<expect select="()"/>
Expand All @@ -84,8 +84,8 @@
<label>expecting xs:string in @test must be Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand Down
6 changes: 3 additions & 3 deletions test/end-to-end/cases/expected/query/imported-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<label>where a function returns 0</label>
<input-wrap xmlns="">
<t:call xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="mirror:param-mirror">
<t:param select="0"/>
</t:call>
Expand All @@ -27,8 +27,8 @@
<label>expecting x:integer in @test must be Success</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:integer"/>
</expect-test-wrap>
<expect select="()"/>
Expand All @@ -41,8 +41,8 @@
<label>expecting xs:string in @test must be Failure</label>
<expect-test-wrap xmlns="">
<t:expect xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:t="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="$t:result instance of xs:string"/>
</expect-test-wrap>
<expect select="()"/>
Expand Down
12 changes: 6 additions & 6 deletions test/end-to-end/cases/expected/query/issue-153-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<scenario id="scenario1" xspec="../../issue-153.xspec">
<label>When a function returns a local date time string</label>
<input-wrap xmlns="">
<x:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
<x:call xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="string">
<x:param select="xs:dateTime('2000-01-01T12:00:00+12:00')"/>
</x:call>
Expand All @@ -17,8 +17,8 @@
<test id="scenario1-expect1" successful="true">
<label>Comparing the function result with the same date time in UTC will report Success</label>
<expect-test-wrap xmlns="">
<x:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
<x:expect xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="xs:dateTime($x:result)"/>
</expect-test-wrap>
<result select="Q{http://www.w3.org/2001/XMLSchema}dateTime('2000-01-01T12:00:00+12:00')"/>
Expand All @@ -27,8 +27,8 @@
<test id="scenario1-expect2" successful="false">
<label>Comparing the function result with a different date time will report Failure</label>
<expect-test-wrap xmlns="">
<x:expect xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
<x:expect xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
test="xs:dateTime($x:result)"/>
</expect-test-wrap>
<result select="Q{http://www.w3.org/2001/XMLSchema}dateTime('2000-01-01T12:00:00+12:00')"/>
Expand Down
8 changes: 4 additions & 4 deletions test/end-to-end/cases/expected/query/issue-355-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<scenario id="scenario1" xspec="../../issue-355.xspec">
<label>xs:integer()</label>
<input-wrap xmlns="">
<x:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
<x:call xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="Q{x-urn:test:mirror}param-mirror">
<x:param as="function(*)" select="function-lookup(xs:QName('xs:integer'), 1)"/>
</x:call>
Expand All @@ -26,8 +26,8 @@
<scenario id="scenario2" xspec="../../issue-355.xspec">
<label>Anonymous</label>
<input-wrap xmlns="">
<x:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
<x:call xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="Q{x-urn:test:mirror}param-mirror">
<x:param as="function(*)" select="function($x){$x+1}"/>
</x:call>
Expand Down
18 changes: 9 additions & 9 deletions test/end-to-end/cases/expected/query/issue-467-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
function="mirror:param-mirror">
<x:param>
<e1 xmlns="ns1">
<e2 xmlns:ns3="ns3" xmlns:ns4="ns4" xmlns="ns2">
<e2 xmlns="ns2" xmlns:ns3="ns3" xmlns:ns4="ns4">
<ns3:e3>
<e4/>
</ns3:e3>
Expand All @@ -23,10 +23,10 @@
</input-wrap>
<result select="/element()">
<content-wrap xmlns="">
<e1 xmlns:mirror="x-urn:test:mirror"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns="ns1">
<e2 xmlns:ns3="ns3" xmlns:ns4="ns4" xmlns="ns2">
<e1 xmlns="ns1"
xmlns:mirror="x-urn:test:mirror"
xmlns:x="http://www.jenitennison.com/xslt/xspec">
<e2 xmlns="ns2" xmlns:ns3="ns3" xmlns:ns4="ns4">
<ns3:e3>
<e4/>
</ns3:e3>
Expand All @@ -38,10 +38,10 @@
<label>Expecting the same structure but in different namespaces</label>
<expect select="/element()">
<content-wrap xmlns="">
<e1 xmlns:mirror="x-urn:test:mirror"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns="ns1">
<e2 xmlns:ns3="ns3" xmlns:ns4="ns4" xmlns="ns2!">
<e1 xmlns="ns1"
xmlns:mirror="x-urn:test:mirror"
xmlns:x="http://www.jenitennison.com/xslt/xspec">
<e2 xmlns="ns2!" xmlns:ns3="ns3" xmlns:ns4="ns4">
<ns3:e3 xmlns:ns3="ns3!">
<e4 xmlns=""/>
</ns3:e3>
Expand Down
4 changes: 2 additions & 2 deletions test/end-to-end/cases/expected/query/issue-50-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<scenario id="scenario1" xspec="../../issue-50.xspec">
<label>Expecting xs:hexBinary('0123') when $x:result is xs:untypedAtomic('0123')</label>
<input-wrap xmlns="">
<x:call xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
<x:call xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="xs:untypedAtomic">
<x:param select="'0123'"/>
</x:call>
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/cases/expected/query/issue-55-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<label>In a failure report HTML</label>
<input-wrap xmlns="">
<x:call xmlns:mirror="x-urn:test:mirror"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:x="http://www.jenitennison.com/xslt/xspec"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
function="mirror:true"/>
</input-wrap>
<result select="Q{http://www.w3.org/2001/XMLSchema}boolean('true')"/>
Expand Down
16 changes: 8 additions & 8 deletions test/end-to-end/cases/expected/query/issue-67-result.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
</input-wrap>
<result select="/*/namespace::*">
<content-wrap xmlns="">
<pseudo-namespace-node xmlns:namespace-name="namespace-text"
xmlns="http://www.jenitennison.com/xslt/xspec"/>
<pseudo-namespace-node xmlns="http://www.jenitennison.com/xslt/xspec"
xmlns:namespace-name="namespace-text"/>
</content-wrap>
</result>
<test id="scenario1-expect1" successful="true">
<label>must be Success</label>
<expect select="/*/namespace::*">
<content-wrap xmlns="">
<pseudo-namespace-node xmlns:namespace-name="namespace-text"
xmlns="http://www.jenitennison.com/xslt/xspec"/>
<pseudo-namespace-node xmlns="http://www.jenitennison.com/xslt/xspec"
xmlns:namespace-name="namespace-text"/>
</content-wrap>
</expect>
</test>
Expand Down Expand Up @@ -59,16 +59,16 @@
</input-wrap>
<result select="/*/namespace::*">
<content-wrap xmlns="">
<pseudo-namespace-node xmlns:namespace-name="namespace-text"
xmlns="http://www.jenitennison.com/xslt/xspec"/>
<pseudo-namespace-node xmlns="http://www.jenitennison.com/xslt/xspec"
xmlns:namespace-name="namespace-text"/>
</content-wrap>
</result>
<test id="scenario3-expect1" successful="false">
<label>must be Failure</label>
<expect select="/*/namespace::*">
<content-wrap xmlns="">
<pseudo-namespace-node xmlns:another-namespace-name="another-namespace-text"
xmlns="http://www.jenitennison.com/xslt/xspec"/>
<pseudo-namespace-node xmlns="http://www.jenitennison.com/xslt/xspec"
xmlns:another-namespace-name="another-namespace-text"/>
</content-wrap>
</expect>
</test>
Expand Down

0 comments on commit 9bbf645

Please sign in to comment.