diff options
author | Nick Burch <nick@apache.org> | 2014-07-03 14:30:47 +0000 |
---|---|---|
committer | Nick Burch <nick@apache.org> | 2014-07-03 14:30:47 +0000 |
commit | 054519db29a29b58ec1d786aa0241c6680fdaed5 (patch) | |
tree | 600e205cbb5cb4cd8c2ec03e6b78cf7ff4d5d50a | |
parent | 4c8504965f25723d50fa44183e090989abae991e (diff) | |
download | poi-054519db29a29b58ec1d786aa0241c6680fdaed5.tar.gz poi-054519db29a29b58ec1d786aa0241c6680fdaed5.zip |
Add a disabled unit test for bug #56420
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1607661 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java | 17 | ||||
-rw-r--r-- | test-data/spreadsheet/56420.xlsx | bin | 0 -> 9201 bytes |
2 files changed, 17 insertions, 0 deletions
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 71f462361c..13e6629b77 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -1565,6 +1565,23 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { File xlsOutput = TempFile.createTempFile("testBug53798", ".xls"); bug53798Work(wb, xlsOutput); } + + /** + * SUMIF was throwing a NPE on some formulas + */ + @Test + @Ignore("This bug is still to be fixed") + public void testBug56420SumIfNPE() throws Exception { + XSSFWorkbook wb = XSSFTestDataSamples.openSampleWorkbook("56420.xlsx"); + + FormulaEvaluator evaluator = wb.getCreationHelper().createFormulaEvaluator(); + + Sheet sheet = wb.getSheetAt(0); + Row r = sheet.getRow(2); + Cell c = r.getCell(2); + assertEquals("SUMIF($A$1:$A$4,A3,$B$1:$B$4)", c.getCellFormula()); + evaluator.evaluateInCell(c); + } private void bug53798Work(Workbook wb, File xlsOutput) throws IOException { Sheet testSheet = wb.getSheetAt(0); diff --git a/test-data/spreadsheet/56420.xlsx b/test-data/spreadsheet/56420.xlsx Binary files differnew file mode 100644 index 0000000000..bd1ceff966 --- /dev/null +++ b/test-data/spreadsheet/56420.xlsx |