aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2024-11-30 09:36:20 +0000
committerDominik Stadler <centic@apache.org>2024-11-30 09:36:20 +0000
commit1700967d1783a65ed99cf60ba4212756cce5a288 (patch)
treec4123ec9b4848824253fc085a1a5b00fee63e1cc
parent4f5d7781c138b683cfd7226e0033efa587950125 (diff)
downloadpoi-1700967d1783a65ed99cf60ba4212756cce5a288.tar.gz
poi-1700967d1783a65ed99cf60ba4212756cce5a288.zip
Expect an XML parser error in one test when running with IBM JDK
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1922231 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java
index ce260bbe52..956041f2fb 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFVMLDrawing.java
@@ -48,6 +48,7 @@ import com.microsoft.schemas.vml.STStrokeJoinStyle;
import com.microsoft.schemas.vml.impl.CTShapetypeImpl;
import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream;
import org.apache.poi.POIDataSamples;
+import org.apache.poi.ooxml.POIXMLException;
import org.apache.xmlbeans.XmlException;
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
@@ -218,6 +219,9 @@ class TestXSSFVMLDrawing {
void testInvalidFile() throws IOException {
try (XSSFWorkbook workbook = openSampleWorkbook("clusterfuzz-testcase-minimized-POIXSSFFuzzer-5089447305609216.xlsx")) {
assertNotNull(workbook);
+ } catch (POIXMLException e) {
+ // XML parser of IBM JDK is a bit more picky on XML in this file, so we expect it to fail there with this error
+ assertTrue(e.getMessage().contains("Attribute name \"sheetId\" associated with an element type \"sheet\" must be followed by the ' = ' character."));
}
}
} \ No newline at end of file