]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Generate suppressions with eval BLOCK, and test it too
authorVincent Pit <vince@profvince.com>
Mon, 8 Sep 2008 21:52:57 +0000 (23:52 +0200)
committerVincent Pit <vince@profvince.com>
Mon, 8 Sep 2008 21:52:57 +0000 (23:52 +0200)
MANIFEST
gen.pl
t/21-good-block.t [new file with mode: 0644]

index 074e4a05f7dbb02ed67c7bd223efd36b59b19884..b7296d2cc2c3843a003e41d1d6c947fce37545de 100644 (file)
--- 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 828a6b9279380589ced71dade59828d527b155de..99d5ca5cbf196d17b7af18e2f876b243056f87f7 100755 (executable)
--- 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 (file)
index 0000000..7eea4b5
--- /dev/null
@@ -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;