ruby-changes:65213
From: Hiroshi <ko1@a...>
Date: Wed, 10 Feb 2021 12:50:22 +0900 (JST)
Subject: [ruby-changes:65213] 231f0f6f45 (master): [ruby/zlib] test-unit didn't provide __name__ attribute
https://git.ruby-lang.org/ruby.git/commit/?id=231f0f6f45 From 231f0f6f45336ec9fff167d00f87b0f53bd01be7 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA <hsbt@r...> Date: Tue, 2 Feb 2021 20:59:04 +0900 Subject: [ruby/zlib] test-unit didn't provide __name__ attribute https://github.com/ruby/zlib/commit/7d3fc1f325 --- test/zlib/test_zlib.rb | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index e6d61ca..126fc48 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -1278,11 +1278,20 @@ if defined? Zlib https://github.com/ruby/ruby/blob/trunk/test/zlib/test_zlib.rb#L1278 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 -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/