Skip to content

Commit

Permalink
Merge pull request #670 from xml-project/more-tests
Browse files Browse the repository at this point in the history
New and changed tests
  • Loading branch information
xml-project authored Aug 31, 2023
2 parents 0004153 + 710c328 commit 72e7a1a
Show file tree
Hide file tree
Showing 13 changed files with 279 additions and 6 deletions.
11 changes: 10 additions & 1 deletion test-suite/tests/ab-error-xd0051-002.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="p:file-move" code="err:XD0051"
<t:test expected="fail" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 002 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Removed unnecessary feature p:file-move</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-08-04</t:date>
<t:author>
Expand Down
11 changes: 10 additions & 1 deletion test-suite/tests/ab-error-xd0051-003.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="p:file-move" code="err:XD0051"
<t:test expected="fail" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 003 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Removed unnecessary feature p:file-move</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-08-04</t:date>
<t:author>
Expand Down
11 changes: 10 additions & 1 deletion test-suite/tests/ab-error-xd0051-004.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="p:file-move" code="err:XD0051"
<t:test expected="fail" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 004 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Removed unnecessary feature p:file-move</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-08-04</t:date>
<t:author>
Expand Down
11 changes: 10 additions & 1 deletion test-suite/tests/ab-error-xd0051-005.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="p:file-move" code="err:XD0051"
<t:test expected="fail" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 005 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Removed unnecessary feature p:file-move</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-08-04</t:date>
<t:author>
Expand Down
11 changes: 10 additions & 1 deletion test-suite/tests/ab-error-xd0051-006.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="p:file-move" code="err:XD0051"
<t:test expected="fail" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 006 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Removed unnecessary feature p:file-move</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-08-04</t:date>
<t:author>
Expand Down
11 changes: 10 additions & 1 deletion test-suite/tests/ab-error-xd0051-007.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="p:file-move" code="err:XD0051"
<t:test expected="fail" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 007 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Removed unnecessary feature p:file-move</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2022-08-04</t:date>
<t:author>
Expand Down
33 changes: 33 additions & 0 deletions test-suite/tests/ab-error-xd0051-008.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="HOF" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 008 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial commit</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0051: No functions allowed as result in AVT.</p>
</t:description>

<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc">
<p:output port="result"/>

<p:add-attribute attribute-name="att" attribute-value="{ function($a){$a} }">
<p:with-input><doc /></p:with-input>
</p:add-attribute>
</p:declare-step>
</t:pipeline>
</t:test>
33 changes: 33 additions & 0 deletions test-suite/tests/ab-error-xd0051-009.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="HOF" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 009 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial commit</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0051: No functions allowed as result in AVT.</p>
</t:description>

<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc">
<p:output port="result"/>
<p:variable name="func" select="function($a){$a}" />
<p:add-attribute attribute-name="att" attribute-value="{ $func }">
<p:with-input><doc /></p:with-input>
</p:add-attribute>
</p:declare-step>
</t:pipeline>
</t:test>
33 changes: 33 additions & 0 deletions test-suite/tests/ab-error-xd0051-010.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="HOF" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 0010 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial commit</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0051: No functions allowed as result in TVT.</p>
</t:description>

<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc">
<p:output port="result"/>
<p:variable name="func" select="function($a){$a}" />
<p:add-attribute attribute-name="att" attribute-value="42">
<p:with-input><doc >{$func}</doc></p:with-input>
</p:add-attribute>
</p:declare-step>
</t:pipeline>
</t:test>
32 changes: 32 additions & 0 deletions test-suite/tests/ab-error-xd0051-011.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<t:test expected="fail" features="HOF" code="err:XD0051"
xmlns:err="http://www.w3.org/ns/xproc-error"
xmlns:t="http://xproc.org/ns/testsuite/3.0">
<t:info>
<t:title>Error XD0051 0011 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial commit</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0051: No functions allowed as result in TVT.</p>
</t:description>

<t:pipeline>
<p:declare-step version="3.0"
xmlns:p="http://www.w3.org/ns/xproc">
<p:output port="result"/>
<p:add-attribute attribute-name="att" attribute-value="42">
<p:with-input><doc >{function($a){$a} }</doc></p:with-input>
</p:add-attribute>
</p:declare-step>
</t:pipeline>
</t:test>
29 changes: 29 additions & 0 deletions test-suite/tests/ab-input-031.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0" xmlns:err="http://www.w3.org/ns/xproc-error" expected="fail" code="err:XD0016" features="HOF">
<t:info>
<t:title>Input 031</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial test.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0016 is raised, when @select returns a function.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:input port="source" select="function($a){$a}">
<doc att1="1" att2="2"/>
</p:input>
<p:output port="result"/>

<p:identity/>
</p:declare-step>
</t:pipeline>
</t:test>
29 changes: 29 additions & 0 deletions test-suite/tests/ab-with-input-select-014.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0" xmlns:err="http://www.w3.org/ns/xproc-error" expected="fail" code="err:XD0016" features="HOF">
<t:info>
<t:title>with-input-select-014</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial tests.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests that XD0016 is raised, when @select returns a function.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input select="function($a){$a}">
<doc att1="1" att2="3"/>
</p:with-input>
</p:identity>
</p:declare-step>
</t:pipeline>
</t:test>
30 changes: 30 additions & 0 deletions test-suite/tests/ab-with-input-select-015.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0" xmlns:err="http://www.w3.org/ns/xproc-error" expected="fail" code="err:XD0016" features="HOF">
<t:info>
<t:title>with-input-select-015</t:title>
<t:revision-history>
<t:revision>
<t:date>2023-08-14</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Initial tests.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests that XD0016 is raised, when @select returns a function.</p>
</t:description>
<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
<p:output port="result"/>
<p:variable name="funct" select="function($a){$a}" />
<p:identity>
<p:with-input select="$funct">
<doc att1="1" att2="3"/>
</p:with-input>
</p:identity>
</p:declare-step>
</t:pipeline>
</t:test>

0 comments on commit 72e7a1a

Please sign in to comment.