X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fsimple.t;h=d529ac8b223d84123c625ecc828092d1a2797c35;hb=2c8bc7a3af2bee608b9b567851cea2f6a1dcb988;hp=e4316f3c1c3e145c678375567942967f83023b12;hpb=6f914695d80ef46fe45ac39758eb956f0f5389a6;p=p5sagit%2FEval-WithLexicals.git diff --git a/t/simple.t b/t/simple.t index e4316f3..d529ac8 100644 --- a/t/simple.t +++ b/t/simple.t @@ -27,4 +27,16 @@ is_deeply( 'Inner scope plus lexical ok' ); +is_deeply( + [ $eval->eval('{ my $y = 0 }; $x') ], + [ 1 ], + 'Inner scope and other lexical ok' +); + +is_deeply( + [ keys %{$eval->lexicals} ], + [ '$x' ], + 'No capture of invisible $y' +); + done_testing;