X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=t%2Fhints.t;h=15db971b7a250c15cb5afa0f29de4e528abfbe3f;hp=5ce67d80e7a91f46d857c2357c41763cffb1da7b;hb=a214c345e2de0ddd1e2ab205d942e2b1d7bb47b1;hpb=fb37a6a203f433bb192b039c179b83358330fba7 diff --git a/t/hints.t b/t/hints.t index 5ce67d8..15db971 100644 --- a/t/hints.t +++ b/t/hints.t @@ -54,4 +54,10 @@ $eval->eval(q{ use hint_hash_pragma 'param' }), is $eval->hints->{q{%^H}}->{hint_hash_pragma}, 'param', "Lexical pragma captured"; +$eval->eval('my $x = 1'); +is_deeply( + $eval->lexicals->{'$x'}, \1, + 'Lexical captured when preserving hints', +); + done_testing;