sub do_test {
my $pattern = pop;
- if (open(OUT,">peek$$")) {
- open(STDERR,">&OUT");
+ if (open(STDERR,">peek$$")) {
Dump($_[1]);
- close(OUT);
+ close(STDERR);
if (open(IN, "peek$$")) {
local $/;
$pattern =~ s/\$ADDR/0x[[:xdigit:]]+/g;
print $pattern, "\n" if $DEBUG;
my $dump = <IN>;
print $dump, "\n" if $DEBUG;
- print "not " unless $dump =~ /$pattern/m;
+ print "[$dump] vs [$pattern]\nnot " unless $dump =~ /$pattern/m;
print "ok $_[0]\n";
close(IN);
} else {
"bar",
'SV = PV\\($ADDR\\) at $ADDR
REFCNT = 1
- FLAGS = \\(POK,READONLY,pPOK\\)
+ FLAGS = \\(.*POK,READONLY,pPOK\\)
PV = $ADDR "bar"\\\0
CUR = 3
LEN = 4');
456,
'SV = IV\\($ADDR\\) at $ADDR
REFCNT = 1
- FLAGS = \\(IOK,READONLY,pIOK\\)
+ FLAGS = \\(.*IOK,READONLY,pIOK\\)
IV = 456');
do_test( 5,
0xabcd,
'SV = IV\\($ADDR\\) at $ADDR
REFCNT = 1
- FLAGS = \\(IOK,READONLY,pIOK,IsUV\\)
+ FLAGS = \\(.*IOK,READONLY,pIOK,IsUV\\)
UV = 43981');
do_test( 9,
DEPTH = 1
FLAGS = 0x0
PADLIST = $ADDR
- 1\\. $ADDR \\("\\$pattern" \\d+-\\d+\\)
- 12\\. $ADDR \\(FAKE "\\$DEBUG" 0-\\d+\\)
- 13\\. $ADDR \\("\\$dump" \\d+-\\d+\\)
+ \\d+\\. $ADDR \\("\\$pattern" \\d+-\\d+\\)
+ \\d+\\. $ADDR \\(FAKE "\\$DEBUG" 0-\\d+\\)
+ \\d+\\. $ADDR \\("\\$dump" \\d+-\\d+\\)
OUTSIDE = $ADDR \\(MAIN\\)');
do_test(15,
GPFLAGS = 0x0
LINE = \\d+
FILE = ".+\\b(?i:peek\\.t)"
- FLAGS = 0x2
+ FLAGS = $ADDR
EGV = $ADDR\\t"a"');
END {