X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=t%2Fsimple.t;fp=t%2Fsimple.t;h=e8157ba78d639cf843c4ee53fbdef992d0888e10;hp=d529ac8b223d84123c625ecc828092d1a2797c35;hb=4a3d69ab3eeaa2c4383a988cf6cbf3f0c7fe6073;hpb=b243c437950cbead376f07e6d853d4c79c9693bb 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;