From: Peter Rabbitson Date: Mon, 21 Jul 2014 07:22:03 +0000 (+0200) Subject: Get tests working under `prove -lrswTj10` X-Git-Tag: v0.10011~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2f4e57f4a8cd4f5bc4c4e16bb6c81b711722e697;p=p5sagit%2FClass-Accessor-Grouped.git Get tests working under `prove -lrswTj10` --- diff --git a/lib/Class/Accessor/Grouped.pm b/lib/Class/Accessor/Grouped.pm index b85d0a6..f2c0ea8 100644 --- a/lib/Class/Accessor/Grouped.pm +++ b/lib/Class/Accessor/Grouped.pm @@ -68,7 +68,7 @@ BEGIN { constant->import( TRACK_UNDEFER_FAIL => ( $INC{'Test/Builder.pm'} || $INC{'Test/Builder2.pm'} and - $0 =~ m|^ x?t / .+ \.t $|x + $0 =~ m{ ^ (?: \. \/ )? x?t / .+ \.t $}x ) ? 1 : 0 ); require B; diff --git a/t/accessors_pp.t b/t/accessors_pp.t index de43239..b3cb9cc 100644 --- a/t/accessors_pp.t +++ b/t/accessors_pp.t @@ -40,7 +40,7 @@ for my $tname (qw/accessors.t accessors_ro.t accessors_wo.t/) { my $todo = sub { note "\nTesting $tname without Sub::Name (pass @{[ $pass ++ ]})\n\n"; - my $tfn = catfile($Bin, $tname); + my ($tfn) = catfile($Bin, $tname) =~ /(.+)/; delete $INC{$_} for ( qw/AccessorGroups.pm AccessorGroupsRO.pm AccessorGroupsSubclass.pm AccessorGroupsParent.pm AccessorGroupsWO.pm/, diff --git a/t/accessors_xs.t b/t/accessors_xs.t index 54d8a1f..e97a8a7 100644 --- a/t/accessors_xs.t +++ b/t/accessors_xs.t @@ -42,7 +42,7 @@ for my $tname (qw/accessors.t accessors_ro.t accessors_wo.t/) { my $todo = sub { note "\nTesting $tname with USE_XS (pass @{[ $pass++ ]})\n\n"; - my $tfn = catfile($Bin, $tname); + my ($tfn) = catfile($Bin, $tname) =~ /(.+)/; for ( qw|AccessorGroups.pm AccessorGroups/BeenThereDoneThat.pm AccessorGroupsRO.pm AccessorGroupsSubclass.pm AccessorGroupsParent.pm AccessorGroupsWO.pm|,