summaryrefslogtreecommitdiffstats
path: root/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java')
-rw-r--r--vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java b/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java
index a288b9f0c55..b7f019282b7 100644
--- a/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java
+++ b/vespajlib/src/test/java/com/yahoo/compress/ArchiveStreamReaderTest.java
@@ -62,6 +62,15 @@ class ArchiveStreamReaderTest {
}
@Test
+ void entry_limit() {
+ Map<String, String> entries = Map.of("foo.xml", "foo", "bar.xml", "bar");
+ try {
+ readAll(zip(entries), Options.standard().maxEntries(1));
+ fail("Expected exception");
+ } catch (IllegalArgumentException ignored) {}
+ }
+
+ @Test
void paths() {
Map<String, Boolean> tests = Map.of(
"../../services.xml", true,