mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
b2a4f270e8
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
20 lines
550 B
Ruby
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
|