From: Vincent Pit Date: Sun, 28 Sep 2008 00:41:17 +0000 (+0200) Subject: Don't output the plan twice when no XS can be found, and output the reason from the... X-Git-Tag: v0.07~12 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=187b1e3306bc3430f7d9d0c715a2e1195689cdf5;p=perl%2Fmodules%2FTest-Valgrind.git Don't output the plan twice when no XS can be found, and output the reason from the parent --- diff --git a/t/30-bad.t b/t/30-bad.t index 0ac0129..34e41b7 100644 --- a/t/30-bad.t +++ b/t/30-bad.t @@ -19,7 +19,10 @@ sub tester { XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION); "; if ($@) { + my $err = $@; $dbg = 0; + chomp $err; + diag "XS test code not available ($err)"; } else { my $ret = eval "Test::Valgrind::DEBUGGING()"; $dbg = $@ ? 0 : $ret; @@ -54,10 +57,7 @@ if ($@) { require XSLoader; XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION); "; - if ($@) { - diag $@; - plan skip_all => "XS test code not available"; - } else { + unless ($@) { Test::Valgrind::leak(); } }