From dc252a75a251772f5d2bd9df442d9e6df74638cf Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 6 Apr 2004 02:59:13 +0000 Subject: [PATCH] check zlib existence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/zlib/test_zlib.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index b642fabc8e..4832bcf540 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -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