stevedlawrence commented on code in PR #1149:
URL: https://github.com/apache/daffodil/pull/1149#discussion_r1457913300


##########
daffodil-test/src/test/resources/org/apache/daffodil/section13/zoned/zoned2.tdml:
##########
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<testSuite
+  description="Zoned Number Properties EBCDIC encoding"
+  xmlns:tdml="http://www.ibm.com/xmlns/dfdl/testData";
+  xmlns="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";
+  defaultRoundTrip="true"
+  defaultValidation="limited">
+
+  <tdml:defineSchema
+    name="ebcdic1"
+    xmlns="http://www.w3.org/2001/XMLSchema";
+    useDefaultNamespace="false"
+    elementFormDefault="unqualified">
+
+    <include 
schemaLocation="/org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+
+    <!--
+    Due to DAFFODIL-2874, we must have textZonedSignStyle even though this is 
ebcdic.
+    Once that is fixed, we should remove that property from here.
+     -->
+    <dfdl:format
+      ref="ex:GeneralFormat"
+      lengthKind="explicit"
+      encoding="ebcdic-cp-us"
+      occursCountKind="implicit"
+      textNumberCheckPolicy="strict"
+      textNumberPadCharacter="0"
+      textNumberJustification="right"
+      textNumberRep="zoned"
+      textZonedSignStyle="asciiStandard"
+      lengthUnits="characters"/>
+
+    <simpleType
+      name="displayMoney7Digits"
+      dfdl:representation="text"
+      dfdl:textNumberRep="zoned"
+      dfdl:encoding="ebcdic-cp-us"
+      dfdl:decimalSigned="yes"
+      dfdl:textNumberPattern="+0000000V00"
+      dfdl:length="9">
+      <restriction base="xs:decimal" >
+        <maxInclusive value="9999999.99"/>
+        <minInclusive value="-9999999.99"/>
+      </restriction>
+    </simpleType>
+
+    <element name="money7" type="ex:displayMoney7Digits"/>
+
+  </tdml:defineSchema>
+
+  <parserTestCase name="ZonedEBCDICLeadingSign" root="money7" model="ebcdic1"
+    description="Test of a negative number with ebcdic charset, leading 
overpunched sign of R should be -9">
+    <document>
+      <documentPart type="text" 
encoding="ebcdic-cp-us">R99999999</documentPart>

Review Comment:
   It's there any value in defining the document part in bytes instead of text 
with ebcdic-cp-us encoding? That would show that the issue doesn't have 
anything to do with ebcdic encoding in the documentPartt? I feel like that 
isn't used very often so there's a chance the bug is in that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to