From: Nick Burch Date: Mon, 4 Aug 2014 19:18:20 +0000 (+0000) Subject: Add another test file for #54764, and a test that uses it X-Git-Tag: REL_3_11_BETA2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=69015a079eeb351c95c9aed6da03a0647f664dac;p=poi.git Add another test file for #54764, and a test that uses it git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1615731 13f79535-47bb-0310-9956-ffa450edef68 --- 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 a5420b0b79..64e199f83e 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java @@ -1860,9 +1860,21 @@ public final class TestXSSFBugs extends BaseTestBugzillaIssues { // Now check the spreadsheet itself // TODO Fix then enable -// XSSFWorkbook wb = new XSSFWorkbook(pkg); -// XSSFSheet s = wb.getSheetAt(0); - // TODO Check +/* + try { + new XSSFWorkbook(pkg); + fail("Should fail as too much expansion occurs"); + } catch(POIXMLException e) { + // Expected + } */ + + // Try with one with the entities in the Content Types + try { + XSSFTestDataSamples.openSamplePackage("54764-2.xlsx"); + fail("Should fail as too much expansion occurs"); + } catch(Exception e) { + // Expected + } } /** diff --git a/test-data/spreadsheet/54764-2.xlsx b/test-data/spreadsheet/54764-2.xlsx new file mode 100644 index 0000000000..0d942ca8d3 Binary files /dev/null and b/test-data/spreadsheet/54764-2.xlsx differ