Skip to content

Commit

Permalink
Merge pull request #808 from xml-project/fix-807
Browse files Browse the repository at this point in the history
fix 807: Two new and one slightly symplified test
  • Loading branch information
xml-project authored Jan 12, 2025
2 parents 69068a1 + 232283f commit 0dd4149
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 3 deletions.
35 changes: 35 additions & 0 deletions test-suite/tests/ab-XD0064-001.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XD0064">
<t:info>
<t:title>XD0064 001 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-10</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>New tests inlined documents.</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0064 is raised if value for 'base-uri' in document-properties is no valid uri.</p>
</t:description>

<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:inline document-properties="map{'base-uri' : '%gg'}">
<doc />
</p:inline>
</p:with-input>
</p:identity>

</p:declare-step>
</t:pipeline>
</t:test>
35 changes: 35 additions & 0 deletions test-suite/tests/ab-XD0064-002.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
xmlns:err="http://www.w3.org/ns/xproc-error"
expected="fail" code="err:XD0064">
<t:info>
<t:title>XD0064 002 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-10</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>New tests for inlined documents</p>
</t:description>
</t:revision>
</t:revision-history>
</t:info>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Tests XD0064 is raised if value for 'base-uri' in document-properties is not absolute.</p>
</t:description>

<t:pipeline>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" name="pipeline" version="3.0">
<p:output port="result"/>
<p:identity>
<p:with-input>
<p:inline document-properties="map{'base-uri' : 'relative'}">
<doc />
</p:inline>
</p:with-input>
</p:identity>

</p:declare-step>
</t:pipeline>
</t:test>
13 changes: 10 additions & 3 deletions test-suite/tests/ab-p-archive-072.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
<t:info>
<t:title>p:archive 072 (AB)</t:title>
<t:revision-history>
<t:revision>
<t:date>2025-01-10</t:date>
<t:author>
<t:name>Achim Berndzen</t:name>
</t:author>
<t:description xmlns="http://www.w3.org/1999/xhtml">
<p>Simplied test by removing connection for 'source': No error is raised for relative URI.</p>
</t:description>
</t:revision>
<t:revision>
<t:date>2019-10-18</t:date>
<t:author>
Expand All @@ -24,9 +33,7 @@
<p:output port="result"/>

<p:archive format="zip">
<p:with-input port="source">
<p:inline document-properties="map{'base-uri' : 'one'}"></p:inline>
</p:with-input>
<p:with-input port="source"><p:empty /></p:with-input>
<p:with-input port="manifest">
<c:archive>
<c:entry name="a.xml" href="one" />
Expand Down

0 comments on commit 0dd4149

Please sign in to comment.