caveat about error-silencing
[p5sagit/Try-Tiny.git] / t / finally.t
index 634cd8f..80af9e5 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 #use warnings;
 
-use Test::More tests => 11;
+use Test::More tests => 13;
 
 BEGIN { use_ok 'Try::Tiny' };
 
@@ -56,5 +56,22 @@ try {
   }
 };
 
+try {
+  die("Die\n");
+} finally {
+  is_deeply(\@_, [ "Die\n" ], "finally got passed the exception");
+};
+
+try {
+    try {
+        die "foo";
+    }
+    catch {
+        die "bar";
+    }
+    finally {
+        pass("finally called");
+    };
+};
 
 1;