Skip to content

Commit

Permalink
Add test for problem reported by Mark Fowler, and fixed by Vincent Pit
Browse files Browse the repository at this point in the history
  • Loading branch information
ashb committed Sep 9, 2009
1 parent 658f7bb commit df603f5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion t/nested.t
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use strict;
use warnings;
use Test::More tests => 5;
use Test::More;

use TryCatch;

Expand All @@ -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 {
Expand Down Expand Up @@ -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.