This will make it easier to debug test failures (like if the child dies).
eval {
require Test::Valgrind;
- Test::Valgrind->import;
+ Test::Valgrind->import(diag => 1);
};
if ($@) {
diag $@;
}
plan tests => 1;
-fail 'should not be seen';
+fail 'dummy test in the child, should not interfere with the actual TAP stream';
eval {
require Test::Valgrind;
- Test::Valgrind->import(action => 'Test::Valgrind::Test::Action');
+ Test::Valgrind->import(
+ action => 'Test::Valgrind::Test::Action',
+ );
};
if ($@) {
diag $@;
if ($@) {
diag $@;
} else {
+ diag "leaking some bytes!";
Test::Valgrind::leak();
}
use Test::Builder;
-sub new { shift->SUPER::new(extra_tests => $extra_tests) }
+sub new {
+ my $class = shift;
+
+ $class->SUPER::new(
+ diag => 1,
+ extra_tests => $extra_tests,
+ );
+}
my @filtered_reports;