aboutsummaryrefslogtreecommitdiffstats
path: root/poi-ooxml
diff options
context:
space:
mode:
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));
+ }
+ }
+
}