From: Vincent Pit Date: Sun, 28 Sep 2008 00:18:05 +0000 (+0200) Subject: Don't output our plan if one has already been set X-Git-Tag: v0.07~14 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=f3c8716f1601664c8241ce82fa5664d0819dce90 Don't output our plan if one has already been set --- diff --git a/lib/Test/Valgrind.pm b/lib/Test/Valgrind.pm index a656130..f5cee90 100644 --- a/lib/Test/Valgrind.pm +++ b/lib/Test/Valgrind.pm @@ -146,7 +146,7 @@ sub import { } } if (!$vg) { - $Test->plan(skip_all => 'No valgrind executable could be found in your path'); + $Test->skip_all('No valgrind executable could be found in your path'); return; } } @@ -183,7 +183,7 @@ sub import { } close $wtr or croak "close(\$wtr): $!"; local $SIG{INT} = sub { kill -(SIGTERM) => $pid }; - $Test->plan(tests => 5) unless $args{no_test}; + $Test->plan(tests => 5) unless $args{no_test} or defined $Test->has_plan; my @tests = ( 'errors', 'definitely lost', 'indirectly lost', 'possibly lost', 'still reachable'