X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F07-context_info.t;h=5dbfa45bdfb01f72b3280f81592217b8106cab48;hb=6e6aa503ec0f8dc6f7c01ac956f57d34eb1f7eda;hp=58ea97b6d579d7c6735178170fa22e73963f0029;hpb=d3500bc9b8882716ee933336bb903e20735e54ed;p=perl%2Fmodules%2FScope-Upper.git diff --git a/t/07-context_info.t b/t/07-context_info.t index 58ea97b..5dbfa45 100644 --- a/t/07-context_info.t +++ b/t/07-context_info.t @@ -12,7 +12,7 @@ use Config qw<%Config>; # change ; and that doesn't fit well with how we're testing things. use lib 't/lib'; -use Test::Leaner tests => 19 + 6; +use Test::Leaner tests => 18 + 6; use Scope::Upper qw; @@ -45,8 +45,11 @@ sub expected { } if ($top) { - $want = "$]" < 5.015_001 ? '' : undef; - $hints &= ~HINT_BLOCK_SCOPE if $Config{usesitecustomize}; + $want = "$]" < 5.015_001 ? '' : undef; + $hints &= ~HINT_BLOCK_SCOPE if $Config{usesitecustomize}; + $hints |= HINT_BLOCK_SCOPE if "$]" >= 5.019003; + $warnings = sub { use warnings; (caller 0)[9] }->() if "$]" < 5.007 + and not $^W; } my @exp = ( @@ -77,7 +80,6 @@ sub setup () { is_deeply [ context_info ], $exp0, 'main : context_info'; is_deeply [ context_info(HERE) ], $exp0, 'main : context_info HERE'; -is_deeply [ context_info(UP) ], $exp0, 'main : context_info UP'; is_deeply [ context_info(-1) ], $exp0, 'main : context_info -1'; package Scope::Upper::TestPkg::A; BEGIN { ::setup }