another dataformatter test

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918810 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2024-07-02 00:32:59 +00:00
parent 3f246cc189
commit 05c79326be

View File

@ -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));
}
}
} }