mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_marshal.rb: assert bad link
* test/ruby/test_marshal.rb (test_marshal_load_r_prepare_reference_crash): assert an ArgumentError exception at a bad link. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
82b8840320
commit
d90af78f05
1 changed files with 4 additions and 5 deletions
|
@ -730,11 +730,10 @@ class TestMarshal < Test::Unit::TestCase
|
|||
crash = "\x04\bI/\x05\x00\x06:\x06E{\x06@\x05T"
|
||||
|
||||
opt = %w[--disable=gems]
|
||||
assert_ruby_status(opt, <<-RUBY)
|
||||
begin
|
||||
Marshal.load(#{crash.dump})
|
||||
rescue ArgumentError
|
||||
end
|
||||
assert_separately(opt, <<-RUBY)
|
||||
assert_raise_with_message(ArgumentError, /bad link/) do
|
||||
Marshal.load(#{crash.dump})
|
||||
end
|
||||
RUBY
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue