number on failure because _where() was hard coded to only
look one level up the call stack. In these cases it has to
look two.
(Schwern)
p4raw-id: //depot/perl@20240
# t/test.pl - most of Test::More functionality without the fuss
#
+$Level = 1;
my $test = 1;
my $planned;
}
sub _where {
- my @caller = caller(1);
+ my @caller = caller($Level);
return "at $caller[1] line $caller[2]";
}
sub fresh_perl_is {
my($prog, $expected, $runperl_args, $name) = @_;
+ local $Level = 2;
_fresh_perl($prog,
sub { @_ ? $_[0] eq $expected : $expected },
$runperl_args, $name);
sub fresh_perl_like {
my($prog, $expected, $runperl_args, $name) = @_;
+ local $Level = 2;
_fresh_perl($prog,
sub { @_ ?
$_[0] =~ (ref $expected ? $expected : /$expected/) :