From: Nick Burch Date: Wed, 28 Dec 2011 05:29:01 +0000 (+0000) Subject: Add disabled tests for custom formats X-Git-Tag: REL_3_8_FINAL~89 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7a49fa7ad4a4cc6a5bb56e6634e3c9defde9d98f;p=poi.git Add disabled tests for custom formats git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1225098 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java index c8c4cdbe6f..499fe5442b 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java +++ b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java @@ -415,4 +415,21 @@ public class TestDataFormatter extends TestCase { assertEquals(" - ", dfUS.formatRawCellContents(0.0, -1, "_-* #,##0.00_-;-* #,##0.00_-;_-* \"-\"??_-;_-@_-")); assertEquals(" $- ", dfUS.formatRawCellContents(0.0, -1, "_-$* #,##0.00_-;-$* #,##0.00_-;_-$* \"-\"??_-;_-@_-")); } + + /** + * TODO Fix these so that they work + */ + public void DISABLEDtestCustomFormats() { + DataFormatter dfUS = new DataFormatter(Locale.US, true); + String fmt; + + fmt = "\"At\" H:MM AM/PM \"on\" DDDD MMMM D\",\" YYYY"; + assertEquals( + "At 4:20 AM on Thursday May 17, 2007", + dfUS.formatRawCellContents(39219.1805636921, -1, fmt) + ); + + fmt = "0 \"dollars and\" .00 \"cents\""; + assertEquals("19 dollars and .99 cents", dfUS.formatRawCellContents(19.99, -1, fmt)); + } }