git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] mbeckerle commented on a change in pull request #67: Add test showing inability to read data after a layer


mbeckerle commented on a change in pull request #67: Add test showing inability to read data after a layer
URL: https://github.com/apache/incubator-daffodil/pull/67#discussion_r186120156
 
 

 ##########
 File path: daffodil-test/src/test/resources/org/apache/daffodil/layers/layers.tdml
 ##########
 @@ -253,5 +253,50 @@ xxx]]></tdml:documentPart>
       <tdml:error>separator</tdml:error>
     </tdml:errors>
   </tdml:parserTestCase>
+  
+  <tdml:defineSchema name="s4" elementFormDefault="unqualified">
+    <dfdl:defineFormat name="general">
+      <dfdl:format ref="ex:GeneralFormat" lengthKind="delimited" outputNewLine="%CR;%LF;" />
+    </dfdl:defineFormat>
+    <dfdl:defineFormat name="folded">
+      <dfdl:format ref="ex:general" layerTransform="lineFolded_IMF" layerLengthKind="implicit" layerLengthUnits="bytes"
+        layerEncoding="iso-8859-1" />
+    </dfdl:defineFormat>
+    <dfdl:format ref="ex:general" />
+
+    <xs:element name="root">
+      <xs:complexType>
+        <xs:sequence>
+          <xs:sequence dfdl:ref="folded">
+            <xs:element name="header" dfdl:terminator="%CR;%LF;%CR;%LF;">
+              <xs:complexType>
+                <xs:sequence dfdl:separator="%CR;%LF;">
+                  <xs:element name="field" type="xs:string" maxOccurs="unbounded" />
+                </xs:sequence>
+              </xs:complexType>
+            </xs:element>
+          </xs:sequence>
+          <xs:element name="body" type="xs:string" dfdl:initiator="" />
+        </xs:sequence>
+      </xs:complexType>
+    </xs:element>
+  </tdml:defineSchema>
+
+  <tdml:parserTestCase name="layers4" root="root" model="s4" roundTrip="true">
 
 Review comment:
   Another PR has a layers4 test already. Can you rename this layers5 to avoid the merge conflict?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@xxxxxxxxxxxxxxxx


With regards,
Apache Git Services