Skip to content

Commit 227b063

Browse files
committed
Add additional base case failure assertions for the prior IOOBE patching test
1 parent af8c319 commit 227b063

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/test/java/software/coley/lljzip/PatchingTests.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ public void testReadIgnoringFileLengths() {
103103

104104
Path path = Paths.get("src/test/resources/resource-pack-trick-data-ioobe.zip");
105105

106+
// Assert default zip part allocation fails for naive/standard
107+
assertThrows(Throwable.class, () -> ZipIO.readNaive(path));
108+
assertThrows(Throwable.class, () -> ZipIO.readStandard(path));
109+
106110
// Naive strategy finds the file with the trailing '/'
107111
NaiveLocalFileZipReader naiveStrategy = new NaiveLocalFileZipReader(allocator);
108112
ZipArchive zip = assertDoesNotThrow(() -> ZipIO.read(path, naiveStrategy));
Binary file not shown.

0 commit comments

Comments
 (0)