Added a unit test for the WinZipAes multiple OpenEntryStream() bug.

This commit is contained in:
Dan Baumberger
2017-05-23 07:44:45 -07:00
parent 8d3fc3533b
commit 313c044c41
2 changed files with 18 additions and 0 deletions

View File

@@ -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()

Binary file not shown.