diff options
author | PJ Fanning <fanningpj@apache.org> | 2024-07-09 14:16:47 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2024-07-09 14:16:47 +0000 |
commit | bfd4645a726c13eef376a5127c8aca4f40f5e8f6 (patch) | |
tree | 6e88e2fd270ab49f8da032a36a82b69df44e5584 /poi-ooxml | |
parent | c1d6d0d4a1bc6215d8861a345503f1a1c951a49a (diff) | |
download | poi-bfd4645a726c13eef376a5127c8aca4f40f5e8f6.tar.gz poi-bfd4645a726c13eef376a5127c8aca4f40f5e8f6.zip |
add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1919064 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-ooxml')
-rw-r--r-- | poi-ooxml/src/test/java/org/apache/poi/xssf/usermodel/TestXSSFWorkbook.java | 9 |
1 files changed, 9 insertions, 0 deletions
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 78c0eb1796..7926912f6c 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 @@ -1476,6 +1476,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( HSSFTestDataSamples.openSampleFileStream("github-321.xlsx"))) { |