Skip to content

Commit

Permalink
Merge pull request #801 from xml-project/test-xs0006
Browse files Browse the repository at this point in the history
More tests for XS0006
  • Loading branch information
xml-project authored Jan 4, 2025
2 parents f01029f + d88ca61 commit 3cb3b76
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test-suite/tests/ab-err-xs0006-001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-001</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-03</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><doc /></p:with-input>
</p:identity>
<p:sink />
</p:declare-step>
</t:pipeline>
</t:test>
36 changes: 36 additions & 0 deletions test-suite/tests/ab-err-xs0006-002.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-002</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-03</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:for-each>
<p:with-input><source /></p:with-input>
<p:output port="result" />
<p:sink />
</p:for-each>

</p:declare-step>
</t:pipeline>
</t:test>
47 changes: 47 additions & 0 deletions test-suite/tests/ab-err-xs0006-003.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-003</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-03</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><source /></p:with-input>
</p:identity>

<p:choose>
<p:when test="true()">
<p:output port="result" />
<p:sink />
</p:when>
<p:otherwise>
<p:output port="result" />
<p:identity>
<p:with-input><otherwise /></p:with-input>
</p:identity>
</p:otherwise>
</p:choose>

</p:declare-step>
</t:pipeline>
</t:test>
47 changes: 47 additions & 0 deletions test-suite/tests/ab-err-xs0006-004.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-004</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-03</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><source /></p:with-input>
</p:identity>

<p:choose>
<p:when test="true()">
<p:output port="result" />
<p:identity>
<p:with-input><otherwise /></p:with-input>
</p:identity>
</p:when>
<p:otherwise>
<p:output port="result" />
<p:sink />
</p:otherwise>
</p:choose>

</p:declare-step>
</t:pipeline>
</t:test>
38 changes: 38 additions & 0 deletions test-suite/tests/ab-err-xs0006-005.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-005</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-03</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:group>
<p:output port="result" />
<p:identity>
<p:with-input><doc /></p:with-input>
</p:identity>
<p:sink />
</p:group>

</p:declare-step>
</t:pipeline>
</t:test>
38 changes: 38 additions & 0 deletions test-suite/tests/ab-err-xs0006-006.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-006</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-04</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><source /></p:with-input>
</p:identity>

<p:viewport match="*">
<p:sink />
</p:viewport>

</p:declare-step>
</t:pipeline>
</t:test>
39 changes: 39 additions & 0 deletions test-suite/tests/ab-err-xs0006-007.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-007</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-04</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><source /></p:with-input>
</p:identity>

<p:viewport match="*">
<p:output port="result" />
<p:sink />
</p:viewport>

</p:declare-step>
</t:pipeline>
</t:test>
44 changes: 44 additions & 0 deletions test-suite/tests/ab-err-xs0006-008.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-008</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-04</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><source /></p:with-input>
</p:identity>

<p:try>
<p:output port="result" />
<p:sink />

<p:catch>
<p:output port="result" />
<p:identity />
</p:catch>
</p:try>

</p:declare-step>
</t:pipeline>
</t:test>
44 changes: 44 additions & 0 deletions test-suite/tests/ab-err-xs0006-009.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XS0006">
<t:info>
<t:title>Test ab-err-xs0006-009</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-04</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 that <code>err:XS0006</code> is raised.</p>
</t:description>

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

<p:identity>
<p:with-input><source /></p:with-input>
</p:identity>

<p:try>
<p:output port="result" />
<p:identity />

<p:catch>
<p:output port="result" />
<p:sink />
</p:catch>
</p:try>

</p:declare-step>
</t:pipeline>
</t:test>

0 comments on commit 3cb3b76

Please sign in to comment.