X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=gen.pl;h=b995b50552105da4dadb16e5a130cfd4e9cb418e;hb=9a6e8be3534feee179fe0d63d284948f340ac67d;hp=828a6b9279380589ced71dade59828d527b155de;hpb=8d66aa098b18f8c9724b12bf446d330905122c57;p=perl%2Fmodules%2FTest-Valgrind.git diff --git a/gen.pl b/gen.pl index 828a6b9..b995b50 100755 --- a/gen.pl +++ b/gen.pl @@ -1,28 +1,30 @@ -#!perl - use strict; use warnings; use Test::More; -eval <<'EOD'; -use Test::Valgrind - diag => 1, - no_test => 1, - no_supp => 1, - callers => 50, - extra => [ qw/--show-reachable=yes --gen-suppressions=all/ ] -EOD +eval { + use Test::Valgrind + diag => 1, + no_test => 1, + no_supp => 1, + callers => 50, + extra => [ qw/--show-reachable=yes --gen-suppressions=all/ ]; +}; if ($@) { plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind'; } else { - eval { + eval " + use lib qw{blib/arch}; require XSLoader; - XSLoader::load('Test::Valgrind', $Test::Valgrind::VERSION); - }; + XSLoader::load('Test::Valgrind', \$Test::Valgrind::VERSION); + "; unless ($@) { + plan tests => 1; Test::Valgrind::notleak("valgrind it!"); + fail('fake'); + } else { + diag $@; } } 1; -