]> source.dussan.org Git - poi.git/commitdiff
Add another test file for #54764, and a test that uses it
authorNick Burch <nick@apache.org>
Mon, 4 Aug 2014 19:18:20 +0000 (19:18 +0000)
committerNick Burch <nick@apache.org>
Mon, 4 Aug 2014 19:18:20 +0000 (19:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1615731 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFBugs.java
test-data/spreadsheet/54764-2.xlsx [new file with mode: 0644]

index a5420b0b7907279754ab54ec15c32c83ebbdb837..64e199f83e87415a0555b0ad439f76560bad0e0f 100644 (file)
@@ -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 (file)
index 0000000..0d942ca
Binary files /dev/null and b/test-data/spreadsheet/54764-2.xlsx differ