X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=t%2Fsimple.t;h=e8157ba78d639cf843c4ee53fbdef992d0888e10;hp=d529ac8b223d84123c625ecc828092d1a2797c35;hb=HEAD;hpb=4d546654611503afe4282e5a4a4e7e291101d9bb diff --git a/t/simple.t b/t/simple.t index d529ac8..e8157ba 100644 --- a/t/simple.t +++ b/t/simple.t @@ -39,4 +39,12 @@ is_deeply( 'No capture of invisible $y' ); +$eval->eval('my $y = sub { $_[0]+1 }'); + +is_deeply( + [ $eval->eval('$y->(2)') ], + [ 3 ], + 'Sub created ok' +); + done_testing;