]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/commitdiff
Kwalitee test overhaul
authorVincent Pit <vince@profvince.com>
Sat, 26 Sep 2009 09:53:10 +0000 (11:53 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 26 Sep 2009 09:54:21 +0000 (11:54 +0200)
t/99-kwalitee.t

index 7775e608d046d625d33d383cd329e8197a3e5ede..185d4cef2cf686f510009c018d655d9f504af55f 100644 (file)
@@ -5,5 +5,17 @@ use warnings;
 
 use Test::More;
 
-eval { require Test::Kwalitee; Test::Kwalitee->import() };
-plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;
+eval { require Test::Kwalitee; };
+plan(skip_all => 'Test::Kwalitee not installed') if $@;
+
+SKIP: {
+ eval { Test::Kwalitee->import(); };
+ if (my $err = $@) {
+  1 while chomp $err;
+  require Test::Builder;
+  my $Test = Test::Builder->new;
+  my $plan = $Test->has_plan;
+  $Test->skip_all($err) if not defined $plan or $plan eq 'no_plan';
+  skip $err => $plan - $Test->current_test;
+ }
+}