blob: f651185fa7b013295cd8480ca5bc44fb7cc8cdc8 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<tdml:testSuite suiteName="General" description="Section 00 - General tests"
xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ex="http://example.com">
<!-- This file is for general purpose tests that are not related
to any specific requirements. /!-->
<tdml:defineSchema name="generalSchema">
<dfdl:defineFormat name="daffodilTest1">
<dfdl:format lengthKind="implicit" representation="text"
lengthUnits="bytes" encoding="US-ASCII" initiator="" terminator=""
separator="" ignoreCase="no" textNumberRep="standard" leadingSkip="0" />
</dfdl:defineFormat>
<dfdl:format ref="daffodilTest1" />
<xs:element name="string1" dfdl:lengthKind="delimited" type="xs:string" />
<xs:element name="double" type="xs:double"/>
</tdml:defineSchema>
<!--
Test name: capitalization
Schema: SimpleTypes-Embedded.dfdl.xsd
Purpose: Same as double_07, just verifying that TDML runner is no longer case sensitive when parsing error messages
-->
<tdml:parserTestCase name="capitalization" root="double"
model="generalSchema" description="Section 5 Schema types-double - DFDL-5-009R">
<tdml:document>
<tdml:documentPart type="text">400</tdml:documentPart>
</tdml:document>
<tdml:errors>
<tdml:error>schEmA deFinitIon erRor</tdml:error>
<tdml:error>maxlength was asked for when iSsimplEType(true) and ispriMitivetyPe(trUe)</tdml:error>
</tdml:errors>
</tdml:parserTestCase>
<tdml:defineSchema name="s1">
<dfdl:format ref="ex:daffodilTest1" initiator=""
terminator="" separator="" separatorPolicy="suppressed"
separatorPosition="infix" documentFinalTerminatorCanBeMissing="yes"
encoding="ASCII" representation="text" occursCountKind="parsed"
nilValueDelimiterPolicy="none" nilValue="nil %ES;" nilKind="literalValue"
textNumberRep="standard" ignoreCase="no" initiatedContent="no"
byteOrder="bigEndian" binaryNumberRep="binary" lengthUnits="bytes"/>
<xs:element name="doc" dfdl:lengthKind="implicit">
<xs:complexType>
<xs:sequence dfdl:separator="," dfdl:terminator=";">
<xs:element name="e1" nillable="true" type="xs:int"
dfdl:lengthKind="delimited" />
<xs:element name="e2" nillable="true" type="xs:int"
dfdl:lengthKind="delimited" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="doc2" dfdl:lengthKind="implicit">
<xs:complexType>
<xs:sequence dfdl:separator="," dfdl:terminator=";">
<xs:element name="e1" nillable="true" type="xs:int"
dfdl:lengthKind="delimited" />
<xs:element name="e2" nillable="true" type="xs:int"
dfdl:lengthKind="delimited" />
<xs:element name="e3" nillable="true" type="xs:int"
dfdl:lengthKind="implicit" />
<xs:element name="e4" nillable="true" type="xs:int"
dfdl:lengthKind="implicit" />
<xs:element name="e5" nillable="true" type="xs:int"
dfdl:lengthKind="delimited" />
</xs:sequence>
</xs:complexType>
</xs:element>
</tdml:defineSchema>
<tdml:parserTestCase name="litNil1" root="doc"
model="s1" description="literal nil - DFDL-13-234R">
<tdml:document>
<tdml:documentPart type="file">ext_file.txt</tdml:documentPart>
</tdml:document>
<tdml:infoset>
<tdml:dfdlInfoset>
<doc>
<e1>0</e1>
<e2 xsi:nil="true" />
</doc>
</tdml:dfdlInfoset>
</tdml:infoset>
</tdml:parserTestCase>
<!--
Test name: litNil2
Schema: s1
Purpose: Test to verify that a document can come from several parts (file, byte, text)
-->
<!--
This test is commented out until DFDL-577 has been resolved
<tdml:parserTestCase name="litNil2" root="doc2"
model="s1" description="literal nil - DFDL-13-234R">
<tdml:document>
<tdml:documentPart type="file">ext_file2.txt</tdml:documentPart>
<tdml:documentPart type="byte">000000002CFFFFFFFF3B</tdml:documentPart>
<tdml:documentPart type="text">,400;</tdml:documentPart>
</tdml:document>
<tdml:infoset>
<tdml:dfdlInfoset>
<doc>
<e1>0</e1>
<e2 xsi:nil="true" />
<e3 xsi:nil="true" />
<e4>-1</e4>
<e5>400</e5>
</doc>
</tdml:dfdlInfoset>
</tdml:infoset>
</tdml:parserTestCase>
-->
<tdml:parserTestCase name="fileDNE" root="doc"
model="s1" description="literal nil - DFDL-13-234R">
<tdml:document>
<tdml:documentPart type="file">file_does_not_exist.txt</tdml:documentPart>
</tdml:document>
<tdml:errors>
<tdml:error>was not found</tdml:error>
</tdml:errors>
</tdml:parserTestCase>
</tdml:testSuite>