You've already forked linux-packaging-mono
Imported Upstream version 4.0.4.1
Former-commit-id: d8eb832a9a4b58a238f2e069a0b68c70082f8790
This commit is contained in:
@ -362,6 +362,41 @@ namespace MonoTests.System.IO.Compression
|
||||
backing.Close();
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
[ExpectedException (typeof (ArgumentException))]
|
||||
public void CheckBufferOverrun ()
|
||||
{
|
||||
byte[] data = new byte [20];
|
||||
MemoryStream backing = new MemoryStream ();
|
||||
DeflateStream compressing = new DeflateStream (backing, CompressionLevel.Fastest, true);
|
||||
compressing.Write (data, 0, data.Length + 1);
|
||||
compressing.Close ();
|
||||
backing.Close ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Bug28777_EmptyFlush ()
|
||||
{
|
||||
MemoryStream backing = new MemoryStream ();
|
||||
DeflateStream compressing = new DeflateStream (backing, CompressionLevel.Fastest, true);
|
||||
compressing.Flush ();
|
||||
compressing.Close ();
|
||||
backing.Close ();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Bug28777_DoubleFlush ()
|
||||
{
|
||||
byte[] buffer = new byte [4096];
|
||||
MemoryStream backing = new MemoryStream ();
|
||||
DeflateStream compressing = new DeflateStream (backing, CompressionLevel.Fastest, true);
|
||||
compressing.Write (buffer, 0, buffer.Length);
|
||||
compressing.Flush ();
|
||||
compressing.Flush ();
|
||||
compressing.Close ();
|
||||
backing.Close ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user