mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
add poifs test
This commit is contained in:
parent
5c9bb13cd7
commit
8d71c1f2ff
@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BIN
test-data/poifs/deep-data.bin
Normal file
BIN
test-data/poifs/deep-data.bin
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user