From: Vincent Pit Date: Sat, 31 Oct 2015 11:20:34 +0000 (-0200) Subject: Make sure t/20-bad.t does no extra checks when no valgrind was found X-Git-Tag: rt101934~1 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=764e57fa66b8998b44e9c8e369df99399e030896 Make sure t/20-bad.t does no extra checks when no valgrind was found --- diff --git a/t/lib/Test/Valgrind/Test/Action.pm b/t/lib/Test/Valgrind/Test/Action.pm index 07ffde5..3f9c0c7 100644 --- a/t/lib/Test/Valgrind/Test/Action.pm +++ b/t/lib/Test/Valgrind/Test/Action.pm @@ -18,6 +18,7 @@ BEGIN { } else { $extra_tests = 3; *report = *report_smart; + *abort = *abort_smart; } } @@ -60,6 +61,14 @@ sub report_smart { $self->SUPER::report($sess, $report); } +sub abort_smart { + my $self = shift; + + $extra_tests = 0; + + $self->SUPER::abort(@_); +} + sub DESTROY { return unless $extra_tests;