X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FEval-WithLexicals.git;a=blobdiff_plain;f=t%2Fhints.t;fp=t%2Fhints.t;h=1e101b50f541ef412526b4327f13e195491cac9a;hp=f5681b3d4178eee719dc52e6a2d2d16aa43221e1;hb=9661a07cde22f93b638636322a668c07b597c665;hpb=2b376bd0dc102f9019e007d889a844f94b3a87b9 diff --git a/t/hints.t b/t/hints.t index f5681b3..1e101b5 100644 --- a/t/hints.t +++ b/t/hints.t @@ -10,6 +10,7 @@ use strictures 1; use Test::More; use Eval::WithLexicals; +use lib 't/lib'; my $eval = Eval::WithLexicals->with_plugins("HintPersistence")->new(prelude => ''); @@ -44,13 +45,12 @@ is_deeply( ); # Assumption about perl internals: sort pragma will set a key in %^H. - -$eval->eval(q{ { use sort 'stable' } }), -ok !exists $eval->hints->{q{%^H}}->{sort}, +$eval->eval(q{ { use hint_hash_pragma 'param' } }), +ok !exists $eval->hints->{q{%^H}}->{hint_hash_pragma}, "Lexical pragma used below main scope not captured"; -$eval->eval(q{ use sort 'stable' }), -ok exists $eval->hints->{q{%^H}}->{sort}, +$eval->eval(q{ use hint_hash_pragma 'param' }), +is $eval->hints->{q{%^H}}->{hint_hash_pragma}, 'param', "Lexical pragma captured"; done_testing;