From ff210628cc811e07f0b1476810fcd76526d17719 Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Sun, 8 Feb 2015 15:17:47 +0000 Subject: [PATCH] Add a unit test (disabled) for bug #57535 - "Unknown error type: -60" fetching formula error value git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1658186 13f79535-47bb-0310-9956-ffa450edef68 --- .../poi/xssf/usermodel/TestXSSFBugs.java | 21 ++++++++++++++++++ test-data/spreadsheet/57535.xlsx | Bin 0 -> 10175 bytes 2 files changed, 21 insertions(+) create mode 100644 test-data/spreadsheet/57535.xlsx diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java index 7ab9ff7d02..06af21cc85 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -2133,4 +2133,25 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { } } } + + /** + * "Unknown error type: -60" fetching formula error value + */ + @Test + public void bug57535() throws Exception { + Workbook wb = XSSFTestDataSamples.openSampleWorkbook("57535.xlsx"); + FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator(); + evaluator.clearAllCachedResultValues(); + + Sheet sheet = wb.getSheet("Sheet1"); + Cell cell = sheet.getRow(5).getCell(4); + assertEquals(Cell.CELL_TYPE_FORMULA, cell.getCellType()); + assertEquals("E4+E5", cell.getCellFormula()); + + CellValue value = evaluator.evaluate(cell); + assertEquals(Cell.CELL_TYPE_ERROR, value.getCellType()); + assertEquals(-60, value.getErrorValue()); + // TODO Fix this +// assertEquals("", FormulaError.forInt(value.getErrorValue()).toString()); + } } diff --git a/test-data/spreadsheet/57535.xlsx b/test-data/spreadsheet/57535.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..897ef71ab03094cea6f3bd01f037bc165cf63202 GIT binary patch literal 10175 zcmeHN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