diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-10-20 08:50:51 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-10-20 08:50:51 +0900 |
| commit | f166f63f452d21c55a860d26a57b2f815f5c96f2 (patch) | |
| tree | a2be5275dd67cde396b13cf8abeb5a4499886c7f /test | |
| parent | 750b7c209c2200a602438a75206f5c3c8391f69e (diff) | |
| download | mruby-f166f63f452d21c55a860d26a57b2f815f5c96f2.tar.gz mruby-f166f63f452d21c55a860d26a57b2f815f5c96f2.zip | |
add test case for 750b7c2
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/exception.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/test/t/exception.rb b/test/t/exception.rb index 76c165e95..aa707c1b1 100644 --- a/test/t/exception.rb +++ b/test/t/exception.rb @@ -30,7 +30,7 @@ end assert('Exception#to_s', '15.2.22.5.3') do e = Exception.exception('a') - + e.to_s == 'a' end @@ -269,6 +269,24 @@ assert('Exception 14') do a == :ok end +assert('Exception 15') do + a = begin + :ok + rescue + :ng + end + a == :ok +end + +assert('Exception 16') do + begin + raise "foo" + false + rescue => e + e.message == "foo" + end +end + assert('Exception#inspect without message') do Exception.new.inspect end |
