X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F12-actions.t;h=7aaec9406cf62af725fb900acf698acc7c8586d4;hb=HEAD;hp=a8c4b145b9513e2b1731c8fef546363caedefd13;hpb=c7026b73f65000dc66bd89e44f5c95538f823ccf;p=perl%2Fmodules%2FScope-Context.git diff --git a/t/12-actions.t b/t/12-actions.t index a8c4b14..7aaec94 100644 --- a/t/12-actions.t +++ b/t/12-actions.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 4 * 3 + 2; +use Test::More tests => 4 * 3 + 3; use Scope::Context; @@ -86,6 +86,19 @@ use Scope::Context; is_deeply \@res, [ 1, 2, 3 ], 'unwind: done'; } +{ + my @res = do { + sub { + my $up = Scope::Context->up; + $up->yield(4, 5, 6); + fail 'yield: not reached 1'; + }->(); + fail 'yield: not reached 2'; + return qw; + }; + is_deeply \@res, [ 4, 5, 6 ], 'yield: done'; +} + { sub outer { inner(@_);