X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest.pm;h=8b72950f3ec0dfaa9b129dcfaf49598b5fcda49f;hb=a63c42fc0b2844ff59bc86719fbe2c779067f171;hp=c75a077314fb79faaa54c3b0b5396f8a4cce86b8;hpb=130f0abd0ea76114ffdea39a4fea352a35e5e742;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest.pm b/t/lib/DBICTest.pm index c75a077..8b72950 100644 --- a/t/lib/DBICTest.pm +++ b/t/lib/DBICTest.pm @@ -21,6 +21,32 @@ BEGIN { } } +# This is a pretty good candidate for a standalone extraction (Test::AutoSkip?) +BEGIN { + if ( + ! $ENV{RELEASE_TESTING} + and + ! $ENV{AUTHOR_TESTING} + and + $0 =~ /^ (.*) x?t [\/\\] .+ \.t $/x + and + -f ( my $fn = "$1.auto_todo") + ) { + # fuck you win32 + require File::Spec; + my $canonical_dollarzero = File::Spec::Unix->catpath(File::Spec->splitpath($0)); + + for my $t ( map { + ( $_ =~ /^ \s* ( [^\#\n]+ ) /x ) ? $1 : () + } do { local @ARGV = $fn; <> } ) { + if ( $canonical_dollarzero =~ m! (?: \A | / ) \Q$t\E \z !x ) { + require Test::Builder; + Test::Builder->new->todo_start("Global todoification of '$t' specified in $fn"); + } + } + } +} + use Module::Runtime 'module_notional_filename'; BEGIN { for my $mod (qw( DBIC::SqlMakerTest SQL::Abstract )) {