X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FScope-Upper.git;a=blobdiff_plain;f=t%2F07-context_info.t;fp=t%2F07-context_info.t;h=657285f7d7f7ac5d717b0e6124635a4acbaf09f3;hp=5dbfa45bdfb01f72b3280f81592217b8106cab48;hb=0f9ea972f35aa9749419b792f2a673288d9a63ca;hpb=b9276d0a822f0597b3a4514eda3095c41596e219 diff --git a/t/07-context_info.t b/t/07-context_info.t index 5dbfa45..657285f 100644 --- a/t/07-context_info.t +++ b/t/07-context_info.t @@ -51,6 +51,9 @@ sub expected { $warnings = sub { use warnings; (caller 0)[9] }->() if "$]" < 5.007 and not $^W; } + if (defined $warnings and $warnings =~ m/^\x55*$/) { + $warnings = $warnings::Bits{all}; + } my @exp = ( $pkg, @@ -156,6 +159,9 @@ sub call { my @got = context_info(CALLER $depth); my @exp = caller $depth; defined and not $_ and $_ = '' for $exp[5]; + if (defined $exp[9] and $exp[9] =~ m/^\x55*$/) { + $exp[9] = $warnings::Bits{all}; + } is_deeply \@got, \@exp, "context_info vs caller $depth"; } }