mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/zlib] test-unit didn't provide __name__ attribute
https://github.com/ruby/zlib/commit/7d3fc1f325
This commit is contained in:
parent
49d3830f44
commit
231f0f6f45
1 changed files with 11 additions and 2 deletions
|
@ -1278,11 +1278,20 @@ if defined? Zlib
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
def test_deflate_stream
|
||||
|
|
Loading…
Add table
Reference in a new issue