Skip to content

Commit 728e69b

Browse files
committed
Bug fix: Allow different result types.
In commit 51f5c95 the `TestCase` implementation was udpated to support any format for which a reader exists to be used in the result section of a test case. However, the commit did not include the necessary updates of the metamorph-test schmema. These are added by this commit.
1 parent 51f5c95 commit 728e69b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/main/resources/schemata/metamorph-test.xsd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@
6767
</element>
6868

6969
<element name="result">
70-
<complexType>
70+
<complexType mixed="true">
7171
<sequence>
72-
<element minOccurs="0" ref="cgxml:cgxml" />
72+
<any maxOccurs="unbounded" minOccurs="0" namespace="##other" processContents="lax"/>
7373
</sequence>
7474
<attribute name="src" type="string" use="optional"/>
75-
<attribute name="type" type="string" use="required" fixed="text/x-cg+xml" />
75+
<attribute name="type" type="string" use="required" />
7676
<attribute name="strict-record-order" type="boolean" use="optional" default="true" />
7777
<attribute name="strict-key-order" type="boolean" use="optional" default="true" />
7878
<attribute name="strict-value-order" type="boolean" use="optional" default="true" />

src/test/java/org/culturegraph/mf/test/FrameworkTest.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,14 @@
7676
</cgxml>
7777
</result>
7878
</test-case>
79+
80+
<test-case name="Should allow Formeta as input and output format">
81+
<input type="text/x-formeta">
82+
{ l: v }
83+
</input>
84+
<result type="text/x-formeta">
85+
{ l: v }
86+
</result>
87+
</test-case>
7988

8089
</metamorph-test>

0 commit comments

Comments
 (0)