aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java1
-rw-r--r--poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java6
-rw-r--r--test-data/spreadsheet/duplicate-filename.xlsx (renamed from test-data/spreadsheet/duplicate-file.xlsx)bin10721 -> 10721 bytes
3 files changed, 4 insertions, 3 deletions
diff --git a/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java b/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
index 1f75723c66..f2067ed9a0 100644
--- a/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
+++ b/poi-integration/src/test/java/org/apache/poi/stress/XSSFFileHandler.java
@@ -188,6 +188,7 @@ public class XSSFFileHandler extends SpreadsheetHandler {
EXPECTED_ADDITIONAL_FAILURES.add("spreadsheet/sample-beta.xlsx");
// corrupt/invalid
+ EXPECTED_ADDITIONAL_FAILURES.add("spreadsheet/duplicate-filename.xlsx");
EXPECTED_ADDITIONAL_FAILURES.add("openxml4j/invalid.xlsx");
}
diff --git a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
index 854798f16f..78c0eb1796 100644
--- a/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
+++ b/poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java
@@ -1451,7 +1451,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
@Test
void testDuplicateFileReadAsOPCFile() {
assertThrows(InvalidFormatException.class, () -> {
- try (OPCPackage pkg = OPCPackage.open(getSampleFile("duplicate-file.xlsx"), PackageAccess.READ)) {
+ try (OPCPackage pkg = OPCPackage.open(getSampleFile("duplicate-filename.xlsx"), PackageAccess.READ)) {
// expect exception here
}
});
@@ -1460,7 +1460,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
@Test
void testDuplicateFileReadAsFile() {
assertThrows(InvalidFormatException.class, () -> {
- try (XSSFWorkbook wb = new XSSFWorkbook(getSampleFile("duplicate-file.xlsx"))) {
+ try (XSSFWorkbook wb = new XSSFWorkbook(getSampleFile("duplicate-filename.xlsx"))) {
// expect exception here
}
});
@@ -1469,7 +1469,7 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
@Test
void testDuplicateFileReadAsStream() {
assertThrows(InvalidZipException.class, () -> {
- try (XSSFWorkbook wb = new XSSFWorkbook(openSampleFileStream("duplicate-file.xlsx"))) {
+ try (XSSFWorkbook wb = new XSSFWorkbook(openSampleFileStream("duplicate-filename.xlsx"))) {
// expect exception here
}
});
diff --git a/test-data/spreadsheet/duplicate-file.xlsx b/test-data/spreadsheet/duplicate-filename.xlsx
index 5853cf1ded..5853cf1ded 100644
--- a/test-data/spreadsheet/duplicate-file.xlsx
+++ b/test-data/spreadsheet/duplicate-filename.xlsx
Binary files differ