X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Context.git;a=blobdiff_plain;f=t%2F12-actions.t;h=7aaec9406cf62af725fb900acf698acc7c8586d4;hp=a8c4b145b9513e2b1731c8fef546363caedefd13;hb=e8b777e025ed69b121b659618d6d6451541cee5a;hpb=c983cb7a06c2b883e1bb968726a6c26ce3038c18 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(@_);