diff --git a/tests/SharpCompress.Test/Zip/ZipArchiveTests.cs b/tests/SharpCompress.Test/Zip/ZipArchiveTests.cs index 9ac4737f..ba045ec6 100644 --- a/tests/SharpCompress.Test/Zip/ZipArchiveTests.cs +++ b/tests/SharpCompress.Test/Zip/ZipArchiveTests.cs @@ -324,6 +324,24 @@ namespace SharpCompress.Test VerifyFiles(); } + [Fact] + public void Zip_Deflate_WinzipAES_MultiOpenEntryStream() + { + ResetScratch(); + using (var reader = ZipArchive.Open(Path.Combine(TEST_ARCHIVES_PATH, "Zip.deflate.WinzipAES2.zip"), new ReaderOptions() + { + Password = "test" + })) + { + foreach (var entry in reader.Entries.Where(x => !x.IsDirectory)) + { + var stream = entry.OpenEntryStream(); + Assert.NotNull(stream); + var ex = Record.Exception(() => stream = entry.OpenEntryStream()); + Assert.Null(ex); + } + } + } [Fact] public void Zip_BZip2_Pkware_Read() diff --git a/tests/TestArchives/Archives/Zip.deflate.WinzipAES2.zip b/tests/TestArchives/Archives/Zip.deflate.WinzipAES2.zip new file mode 100644 index 00000000..523670fe Binary files /dev/null and b/tests/TestArchives/Archives/Zip.deflate.WinzipAES2.zip differ