From: Jesse Luehrs Date: Sun, 28 Nov 2010 21:53:14 +0000 (-0600) Subject: add test for finally being called when catch dies X-Git-Tag: Try-Tiny-0.08~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4c82ac88ad7134052a49f7e418270b3cf36d23b7;p=p5sagit%2FTry-Tiny.git add test for finally being called when catch dies --- diff --git a/t/finally.t b/t/finally.t index 622fce8..80af9e5 100644 --- a/t/finally.t +++ b/t/finally.t @@ -3,7 +3,7 @@ use strict; #use warnings; -use Test::More tests => 12; +use Test::More tests => 13; BEGIN { use_ok 'Try::Tiny' }; @@ -62,4 +62,16 @@ try { is_deeply(\@_, [ "Die\n" ], "finally got passed the exception"); }; +try { + try { + die "foo"; + } + catch { + die "bar"; + } + finally { + pass("finally called"); + }; +}; + 1;