From: Vincent Pit Date: Mon, 8 Sep 2008 21:52:57 +0000 (+0200) Subject: Generate suppressions with eval BLOCK, and test it too X-Git-Tag: v0.06~6 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FTest-Valgrind.git;a=commitdiff_plain;h=0e72be5f3401932cb010b7069470e9ee999ff287 Generate suppressions with eval BLOCK, and test it too --- diff --git a/MANIFEST b/MANIFEST index 074e4a0..b7296d2 100644 --- a/MANIFEST +++ b/MANIFEST @@ -15,6 +15,7 @@ t/00-load.t t/01-import.t t/10-suppressions.t t/20-good.t +t/21-good-block.t t/30-bad.t t/90-boilerplate.t t/91-pod.t diff --git a/gen.pl b/gen.pl index 828a6b9..99d5ca5 100755 --- a/gen.pl +++ b/gen.pl @@ -4,14 +4,14 @@ 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 { @@ -25,4 +25,3 @@ if ($@) { } 1; - diff --git a/t/21-good-block.t b/t/21-good-block.t new file mode 100644 index 0000000..7eea4b5 --- /dev/null +++ b/t/21-good-block.t @@ -0,0 +1,11 @@ +#!perl + +use strict; +use warnings; + +use Test::More; +use lib qw{blib/archpub}; +eval { use Test::Valgrind }; +plan skip_all => 'Test::Valgrind is required to run test your distribution with valgrind' if $@; + +1;