summaryrefslogtreecommitdiff
path: root/test/zlib/test_zlib.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/zlib/test_zlib.rb')
-rw-r--r--test/zlib/test_zlib.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb
index d53717e..2d539dd 100644
--- a/test/zlib/test_zlib.rb
+++ b/test/zlib/test_zlib.rb
@@ -1196,5 +1196,13 @@ if defined? Zlib
src = %w[1f8b080000000000000].pack("H*")
assert_raise(Zlib::GzipFile::Error){ Zlib.gunzip(src) }
end
+
+ def test_gunzip_no_memory_leak
+ assert_no_memory_leak(%[-rzlib], "#{<<~"{#"}", "#{<<~'};'}")
+ d = Zlib.gzip("data")
+ {#
+ 10_000.times {Zlib.gunzip(d)}
+ };
+ end
end
end