aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2024-07-02 00:32:59 +0000
committerPJ Fanning <fanningpj@apache.org>2024-07-02 00:32:59 +0000
commit05c79326befab7697466db902b76b96c72f6a698 (patch)
tree8d817869765395ac32da6a334d73c0ce903150c8 /poi-ooxml
parent3f246cc189ce68c8a8f5e2b6fed2babed1385b78 (diff)
downloadpoi-05c79326befab7697466db902b76b96c72f6a698.tar.gz
poi-05c79326befab7697466db902b76b96c72f6a698.zip
another dataformatter test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
index f73060c917..4f512a1d55 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFDataFormat.java
@@ -158,4 +158,18 @@ public final class TestXSSFDataFormat extends BaseTestDataFormat {
*/
}
}
+
+ @Test
+ public void testFormatCellValueDecimal() throws IOException {
+ DataFormatter df = new DataFormatter();
+
+ try (Workbook wb = new XSSFWorkbook()) {
+ Cell cell = wb.createSheet("test").createRow(0).createCell(0);
+ assertEquals("", df.formatCellValue(cell));
+
+ cell.setCellValue(1.005);
+ assertEquals("1.005", df.formatCellValue(cell));
+ }
+ }
+
}