diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-08 13:50:10 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-12-08 13:50:10 +0000 |
commit | 63fe8b697cd886beecb06f4020cab58676aa2a80 (patch) | |
tree | ba8d6dfc4ea03ebb4beaeace0a3f421e93f5436b /test/ruby | |
parent | d9d841e35319353b8ed7174e48af7d9f84197c9c (diff) | |
download | ruby-63fe8b697cd886beecb06f4020cab58676aa2a80.tar.gz |
update doc and add test for SystemExit.new.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_exception.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_exception.rb b/test/ruby/test_exception.rb index 1d16da695c..bb91c96285 100644 --- a/test/ruby/test_exception.rb +++ b/test/ruby/test_exception.rb @@ -334,4 +334,19 @@ end.join arg_string = (0...140000).to_a.join(", ") assert_raise(SystemStackError, bug5720) {eval "raise(#{arg_string})"} end + + def test_systemexit_new + e0 = SystemExit.new + assert_equal(0, e0.status) + assert_equal("SystemExit", e0.message) + ei = SystemExit.new(3) + assert_equal(3, ei.status) + assert_equal("SystemExit", ei.message) + es = SystemExit.new("msg") + assert_equal(0, es.status) + assert_equal("msg", es.message) + eis = SystemExit.new(7, "msg") + assert_equal(7, eis.status) + assert_equal("msg", eis.message) + end end |