mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
check zlib existence.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ce44928d2b
commit
dc252a75a2
1 changed files with 9 additions and 4 deletions
|
@ -1,10 +1,15 @@
|
|||
require 'test/unit/testsuite'
|
||||
require 'test/unit/testcase'
|
||||
|
||||
require 'zlib'
|
||||
begin
|
||||
require 'zlib'
|
||||
rescue LoadError
|
||||
end
|
||||
|
||||
class TestZlibGzipWriter < Test::Unit::TestCase
|
||||
def test_new_nil # [ruby-dev:23228]
|
||||
assert_raises(NoMethodError) { Zlib::GzipWriter.new(nil).close }
|
||||
if defined? Zlib
|
||||
class TestZlibGzipWriter < Test::Unit::TestCase
|
||||
def test_new_nil # [ruby-dev:23228]
|
||||
assert_raises(NoMethodError) { Zlib::GzipWriter.new(nil).close }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue