mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
49d3830f44
commit
231f0f6f45
1 changed files with 11 additions and 2 deletions
|
@ -1278,11 +1278,20 @@ if defined? Zlib
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_inflate
|
def test_inflate
|
||||||
TestZlibInflate.new(__name__).test_inflate
|
s = Zlib::Deflate.deflate("foo")
|
||||||
|
z = Zlib::Inflate.new
|
||||||
|
s = z.inflate(s)
|
||||||
|
s << z.inflate(nil)
|
||||||
|
assert_equal("foo", s)
|
||||||
|
z.inflate("foo") # ???
|
||||||
|
z << "foo" # ???
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_deflate
|
def test_deflate
|
||||||
TestZlibDeflate.new(__name__).test_deflate
|
s = Zlib::Deflate.deflate("foo")
|
||||||
|
assert_equal("foo", Zlib::Inflate.inflate(s))
|
||||||
|
|
||||||
|
assert_raise(Zlib::StreamError) { Zlib::Deflate.deflate("foo", 10000) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_deflate_stream
|
def test_deflate_stream
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue