diff options
author | Nick Burch <nick@apache.org> | 2020-04-07 09:46:32 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2020-04-07 09:46:32 +0000 |
commit | 2fb30f7892b698eeed797b1b27a4d7f3f1702068 (patch) | |
tree | 65a204f9a326c5b7c43065946f4690adc94bb2e6 /src | |
parent | 3a6ebecc6f2e525661921fc4b0c961042360a29d (diff) | |
download | poi-2fb30f7892b698eeed797b1b27a4d7f3f1702068.tar.gz poi-2fb30f7892b698eeed797b1b27a4d7f3f1702068.zip |
Add disabled unit test for #64319
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876225 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java index 23fc311ca0..2949caed96 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java +++ b/src/testcases/org/apache/poi/ss/usermodel/TestDataFormatter.java @@ -965,6 +965,33 @@ public class TestDataFormatter { doFormatTestSequential(formatter1); doFormatTestConcurrent(formatter1, formatter2); } + + /** + * Bug #64319 + * + * A custom format string like TRUE shouldn't be E+ + * A numeric format string like 0E0 shouldn't be E+ + * A numeric format string like 0E+0 should be E+ + */ + @Test + @Ignore("Bug #64319 is currently failing") + public void testWithEinFormat() throws Exception { + DataFormatter formatter = new DataFormatter(); + assertEquals("TRUE", formatter.formatRawCellContents(1.0, 170, + "\"TRUE\";\"TRUE\";\"FALSE\"")); + assertEquals("TRUE", formatter.formatRawCellContents(0.0, 170, + "\"TRUE\";\"TRUE\";\"FALSE\"")); + assertEquals("FALSE", formatter.formatRawCellContents(-1.0, 170, + "\"TRUE\";\"TRUE\";\"FALSE\"")); + assertEquals("1E+05", formatter.formatRawCellContents(1e05, 170, + "0E+00")); + assertEquals("1E+10", formatter.formatRawCellContents(1e10, 170, + "0E+00")); + assertEquals("1E5", formatter.formatRawCellContents(1e05, 170, + "0E0")); + assertEquals("1E10", formatter.formatRawCellContents(1e10, 170, + "0E0")); + } private void doFormatTestSequential(DataFormatter formatter) { for (int i = 0; i < 1_000; i++) { |