diff options
Diffstat (limited to 'test/zlib/test_zlib.rb')
-rw-r--r-- | test/zlib/test_zlib.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index 38cb393872..b6a4510b80 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -127,6 +127,16 @@ if defined? Zlib assert_equal("foobar", Zlib::Inflate.inflate(s)) end + def test_expand_buffer; + z = Zlib::Deflate.new + src = "baz" * 1000 + z.avail_out = 1 + GC.stress = true + s = z.deflate(src, Zlib::FINISH) + GC.stress = false + assert_equal(src, Zlib::Inflate.inflate(s)) + end + def test_total z = Zlib::Deflate.new 1000.times { z << "foo" } |