-
Bug
-
Resolution: Won't Fix
-
Major
-
s11
-
None
-
None
According to the spec:
"If there is an explicit negative subpattern, it serves only to specify the negative prefix and suffix; the number of digits, minimal digits, and other characteristics are ignored in the negative subpattern. That means that "#,##0.0#;(#)" has precisely the same result as "#,##0.0#;(#,##0.0#)""
This requirement sets up a few scenarios:
textNumberPattern | data | expected result | result | test |
---|---|---|---|---|
+##0.00;(0##0.00) | (400.00) | Parse | SDE regarding pattern | textNumberPattern_negativeIgnored02 |
(4030.00) | Parse Error | SDE regarding pattern | textNumberPattern_negativeIgnored01 | |
0000;$###### 'is negative!' | $123456 is negative! | Parse Error | Parses | textNumberPattern_negativeIgnored03 |
$0234 is negative! | Parses | Parses | textNumberPattern_negativeIgnored04 | |
#,##0.0#;(#) | (5) | Parse Error | Parses | textNumberPattern_negativeIgnored05 |
(3,450.00) | Parses | Parses | textNumberPattern_negativeIgnored06 |
see files:
daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section13/text_number_props/TextNumberProps.tdml
daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberPropsDebug.scala
daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section13/text_number_props/TestTextNumberProps.scala