mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919064 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c1d6d0d4a1
commit
bfd4645a72
@ -99,6 +99,7 @@ public class TestAllFiles {
|
||||
|
||||
// corrupt file
|
||||
"spreadsheet/duplicate-filename.xlsx",
|
||||
"spreadsheet/duplicate-filename-case-insensitive.xlsx",
|
||||
"document/clusterfuzz-testcase-minimized-POIXWPFFuzzer-5166796835258368.docx",
|
||||
};
|
||||
|
||||
|
||||
@ -1475,6 +1475,15 @@ public final class TestXSSFWorkbook extends BaseTestXWorkbook {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void testDuplicateFileCaseInsensitiveReadAsStream() {
|
||||
assertThrows(InvalidZipException.class, () -> {
|
||||
try (XSSFWorkbook wb = new XSSFWorkbook(openSampleFileStream("duplicate-filename-case-insensitive.xlsx"))) {
|
||||
// expect exception here
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void testWorkbookCloseClosesInputStream() throws Exception {
|
||||
try (TrackingInputStream stream = new TrackingInputStream(
|
||||
|
||||
BIN
test-data/spreadsheet/duplicate-filename-case-insensitive.xlsx
Normal file
BIN
test-data/spreadsheet/duplicate-filename-case-insensitive.xlsx
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user