mirror of https://github.com/apache/poi.git
rename file
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918803 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
03b0742ad3
commit
8a37350e94
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue