1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/zlib/test_zlib.rb
akr b2a4f270e8 add test for [ruby-dev:23344].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-07 05:06:34 +00:00

20 lines
550 B
Ruby

require 'test/unit/testsuite'
require 'test/unit/testcase'
begin
require 'zlib'
rescue LoadError
end
if defined? Zlib
class TestZlibGzipWriter < Test::Unit::TestCase
def test_invalid_new
# [ruby-dev:23228]
assert_raises(NoMethodError) { Zlib::GzipWriter.new(nil).close }
# [ruby-dev:23344]
assert_raises(NoMethodError) { Zlib::GzipWriter.new(true).close }
assert_raises(NoMethodError) { Zlib::GzipWriter.new(0).close }
assert_raises(NoMethodError) { Zlib::GzipWriter.new(:hoge).close }
end
end
end