mirror of https://github.com/apache/poi.git
[bug-66181] test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1903170 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
280b5130e2
commit
f3a1d6ac92
|
@ -3686,4 +3686,23 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void testBug66181() throws IOException {
|
||||
File file = XSSFTestDataSamples.getSampleFile("ValueFunctionOfBlank.xlsx");
|
||||
try (
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
Workbook workbook = WorkbookFactory.create(fis)
|
||||
) {
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
Row row = sheet.getRow(0);
|
||||
Cell a1 = row.getCell(0);
|
||||
assertEquals(CellType.FORMULA, a1.getCellType());
|
||||
assertEquals(CellType.ERROR, a1.getCachedFormulaResultType());
|
||||
FormulaEvaluator evaluator = workbook.getCreationHelper().createFormulaEvaluator();
|
||||
CellValue cv1 = evaluator.evaluate(a1);
|
||||
//this next line should probably return CellType.ERROR
|
||||
assertEquals(CellType.NUMERIC, cv1.getCellType());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue