Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/ICSharpCode.SharpZipLib.Tests/Zip/ZipEncryptionHandling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void ZipFileStoreAes()
[Test]
[Category("Encryption")]
[Category("Zip")]
public void ZipFileStoreAesPartialRead()
public void ZipFileStoreAesPartialRead([Values(1, 7, 17)] int readSize)
{
string password = "password";

Expand Down Expand Up @@ -179,16 +179,16 @@ public void ZipFileStoreAesPartialRead()
{
using (var zis = zipFile.GetInputStream(entry))
{
byte[] buffer = new byte[1];
byte[] buffer = new byte[readSize];

while (true)
{
int b = zis.ReadByte();
int read = zis.Read(buffer, 0, readSize);

if (b == -1)
if (read == 0)
break;

ms.WriteByte((byte)b);
ms.Write(buffer, 0, read);
}
}

Expand Down