add poifs test

This commit is contained in:
PJ Fanning 2025-07-30 18:54:05 +01:00
parent 5c9bb13cd7
commit 8d71c1f2ff
2 changed files with 10 additions and 0 deletions

View File

@ -2734,6 +2734,15 @@ final class TestPOIFSStream {
}
}
@Test
void testDeepData() throws IOException {
try (InputStream stream = POIDataSamples.getPOIFSInstance().openResourceAsStream("deep-data.bin")) {
IOException ex = assertThrows(IOException.class,
() -> new POIFSFileSystem(stream));
assertEquals("Property tree too deep, likely a corrupt file", ex.getMessage());
}
}
@Disabled("Takes a long time to run")
@Test
void performance() throws Exception {
@ -2781,4 +2790,5 @@ final class TestPOIFSStream {
}
}
}
}

Binary file not shown.