From: Vincent Pit Date: Sat, 26 Sep 2009 09:53:10 +0000 (+0200) Subject: Kwalitee test overhaul X-Git-Tag: v0.38~9 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=efaabfbfb6d1fc8db7ae1722ff0aa18e8c1b7e6c;p=perl%2Fmodules%2FVariable-Magic.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; + } +}