# -*-perl-*-

# As most of the tests fail intentionally, we have to filter our own output
$Silent = $silent = 1;


$afterallexpect = "\QFailed 11/15 test scripts";
$afterallok = 0;
while (<>){
    m|t/dumpcore| and $silent = 0;
    m|t/error| and $silent = $Silent;
    s/\[.*\]// if $silent;
    next if $silent && ! /^t/ && ! /Failed/;
    print;
    $afterallok++ if m|^$afterallexpect|;
}

if ($afterallok) {
    print <<END;

... which means as many tests as should fail failed.
ok

END
} else {
    print <<END;
Expected: "$afterallexpect"
Not ok
END
    die "Not ok";
}
