X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Ftags.t;h=5af34c6200ca7b7ba588167a58ee461280d0a65a;hb=35a1e2d4843a0ea9746ad76353c7a65538fb0b2b;hp=dd0a20d7fc8b33c86256df0544c643698711f7c1;hpb=69c9647cc05997a77e47aefbc7f94fc73e555b6c;p=p5sagit%2FSub-Exporter-Progressive.git diff --git a/t/tags.t b/t/tags.t index dd0a20d..5af34c6 100644 --- a/t/tags.t +++ b/t/tags.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More 0.96; +use Test::More; use List::Util 'first'; use Carp; use lib 't/lib'; @@ -34,24 +34,18 @@ BEGIN { }; my $i = 0; -sub check_tag -{ +sub check_tag { my ($tag, $should, $shouldnt) = @_; my $pkg = 'Local::Importer' . ++$i; - subtest "test the '$tag' tag" => sub - { - plan tests => 1 + @$should + @$shouldnt; - local $@ = undef; - - ok(eval qq{ - package $pkg; - use Local::Exporter qw( $tag ); - 1; - }, "$pkg compiled") or diag $@; - - ok( $pkg->can($_), "$pkg\->can(\"$_\")") for @$should; - ok(!$pkg->can($_), "$pkg\->can't(\"$_\")") for @$shouldnt; - } + + ok(eval qq{ + package $pkg; + use Local::Exporter qw( $tag ); + 1; + }, "'$tag' tag: $pkg compiled") or diag $@; + + ok( $pkg->can($_), "'$tag' tag: $pkg\->can(\"$_\")") for @$should; + ok(!$pkg->can($_), "'$tag' tag: $pkg\->can't(\"$_\")") for @$shouldnt; } check_tag(':default', [qw/foo/], [qw/bar baz/]);