summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro Matsumoto <[email protected]>2012-10-20 08:50:51 +0900
committerYukihiro Matsumoto <[email protected]>2012-10-20 08:50:51 +0900
commitf166f63f452d21c55a860d26a57b2f815f5c96f2 (patch)
treea2be5275dd67cde396b13cf8abeb5a4499886c7f
parent750b7c209c2200a602438a75206f5c3c8391f69e (diff)
downloadmruby-f166f63f452d21c55a860d26a57b2f815f5c96f2.tar.gz
mruby-f166f63f452d21c55a860d26a57b2f815f5c96f2.zip
add test case for 750b7c2
-rw-r--r--test/t/exception.rb20
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