From: Vincent Pit Date: Sat, 26 Sep 2009 09:53:10 +0000 (+0200) Subject: Kwalitee test overhaul X-Git-Tag: v0.03~23 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=2533e6a95934ad035c5fa0b8922f6dac95cccf5c;p=perl%2Fmodules%2Fwith.git Kwalitee test overhaul --- diff --git a/t/99-kwalitee.t b/t/99-kwalitee.t index 7775e60..185d4ce 100644 --- a/t/99-kwalitee.t +++ b/t/99-kwalitee.t @@ -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; + } +}