Fix Peek.t to work with and without DEBUG_LEAKING_SCALARS

p4raw-id: //depot/perl@24091
This commit is contained in:
Rafael Garcia-Suarez 2005-03-29 07:01:40 +00:00
parent 6b0ac556af
commit d94a595083

View File

@ -29,7 +29,7 @@ sub do_test {
$pattern =~ s/\$ADDR/0x[[:xdigit:]]+/g;
$pattern =~ s/\$FLOAT/(?:\\d*\\.\\d+(?:e[-+]\\d+)?|\\d+)/g;
# handle DEBUG_LEAKING_SCALARS prefix
$pattern =~ s/^(\s*)(SV =.* at )/$1ALLOCATED at .*?\n$1$2/mg;
$pattern =~ s/^(\s*)(SV =.* at )/(?:$1ALLOCATED at .*?\n)?$1$2/mg;
print $pattern, "\n" if $DEBUG;
my $dump = <IN>;
print $dump, "\n" if $DEBUG;