summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2014-08-04 19:18:20 +0000
committerNick Burch <nick@apache.org>2014-08-04 19:18:20 +0000
commit69015a079eeb351c95c9aed6da03a0647f664dac (patch)
treea580182416f51a3dc5b5496005002921a6406fe0
parent526abfe065b91c8baa02fd92918604e024764b82 (diff)
downloadpoi-69015a079eeb351c95c9aed6da03a0647f664dac.tar.gz
poi-69015a079eeb351c95c9aed6da03a0647f664dac.zip
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
-rw-r--r--src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java18
-rw-r--r--test-data/spreadsheet/54764-2.xlsxbin0 -> 8115 bytes
2 files changed, 15 insertions, 3 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 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
--- /dev/null
+++ b/test-data/spreadsheet/54764-2.xlsx
Binary files differ