mbeckerle commented on a change in pull request #138: Adding error when 
dfdl:initiator is "%"
URL: https://github.com/apache/incubator-daffodil/pull/138#discussion_r234308617
 
 

 ##########
 File path: 
daffodil-test/src/test/resources/org/apache/daffodil/section12/delimiter_properties/DelimiterProperties.tdml
 ##########
 @@ -810,4 +860,59 @@
     </tdml:infoset>
   </tdml:parserTestCase>
 
+  <tdml:parserTestCase name="percentInitiator"
+    model="DelimiterProperties-Embedded.dfdl.xsd"
+    description="An initiator of '%' causes an error"
+    root="DP_05">
+    <tdml:document><![CDATA[%1,%2,%3,%4]]></tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>Invalid DFDL Entity (%) found</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="percentSeparator"
+    model="DelimiterProperties-Embedded.dfdl.xsd"
+    description="A separator of '%' causes an error"
+    root="DP_06">
+    <tdml:document><![CDATA[:1%:2%:3%:4]]></tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>Invalid DFDL Entity (%) found</tdml:error>
+    </tdml:errors>
+  </tdml:parserTestCase>
+
+  <tdml:parserTestCase name="percentTerminator"
+    model="DelimiterProperties-Embedded.dfdl.xsd"
+    description="A terminator of '%' causes an error"
+    root="DP_07">
+    <tdml:document><![CDATA[1#,2#,3#,4#]]></tdml:document>
+    <tdml:errors>
+      <tdml:error>Schema Definition Error</tdml:error>
+      <tdml:error>Invalid DFDL Entity (%) found</tdml:error>
 
 Review comment:
   This test could check for the advice about needing a self-escaped %. I would 
just add a <tdml:error>%%</tdml:error> to this. 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to