X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F30-bad.t;h=f3313b06d04a5ea81fb35657dfe61e231a6d5669;hb=62b584c5dfcafeecf8afa55570eef9b3106f0f3d;hp=4250639846c86dfe876be3116b13526d9e657d2c;hpb=4ca25301481d92802343f764a0ff2f6e3f82e86b;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/t/30-bad.t b/t/30-bad.t index 4250639..f3313b0 100644 --- a/t/30-bad.t +++ b/t/30-bad.t @@ -29,18 +29,20 @@ sub tester { return $passed; } -eval " - require XSLoader; - XSLoader::load('Test::Valgrind', 0.06); -"; +use lib qw{blib/archpub}; +eval 'use Test::Valgrind cb => \&tester'; if ($@) { - plan skip_all => "XS test code not available ($@)"; + diag $@; + plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind'; } else { - use lib qw{blib/archpub}; - eval 'use Test::Valgrind cb => \&tester;'; + eval " + use lib qw{blib/arch}; + require XSLoader; + XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION); + "; if ($@) { diag $@; - plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind'; + plan skip_all => "XS test code not available"; } else { Test::Valgrind::leak(); }