6 use Test::More tests => 6;
8 use Scope::Upper qw<unwind>;
16 is $@, '', 'unwind() does not croak';
17 is_deeply \@res, [ 7 ], 'unwind()';
23 like $@, qr/^Can't\s+return\s+outside\s+a\s+subroutine/, 'unwind(-1) croaks';
24 is_deeply \@res, [ 7 ], 'unwind(-1)';
30 like $@, qr/^Can't\s+return\s+outside\s+a\s+subroutine/, 'unwind(0) croaks';
31 is_deeply \@res, [ 7 ], 'unwind(0)';