Browse files

Add test for problem reported by Mark Fowler, and fixed by Vincent Pit

  • Loading branch information...
1 parent 658f7bb commit df603f52d15b05041cbc2906ef2e31fa9de08a0c @ashb committed Sep 9, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 t/nested.t
View
6 t/nested.t
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More;
use TryCatch;
@@ -22,7 +22,9 @@ sub nested_2 {
}
is( nested_1(), "from nested_1", "nested try");
+is( main->nested_1(), "from nested_1", "nested try (as method)");
is( nested_2(), "from nested_2", "call nested try");
+is( main->nested_2(), "from nested_2", "call nested try (as method)");
# same thing, but now we return from within the catch
sub nested_catch {
@@ -68,3 +70,5 @@ sub nested_rethrow {
}
is( nested_rethrow(), "caught in outer TC", "nested rethrow" );
+
+done_testing;

0 comments on commit df603f5

Please sign in to comment.