X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xt%2Fextra%2Fdbicadmin.t;h=3f05ac2026363acc701c5bc398df50ca8fb514ea;hb=5a8d5308a40f3958a17335fdc35afddce7d4ae31;hp=cc79190f8ad7a41f4c39498346c9e7a71ceaafde;hpb=da9346a03a7df80d02f40584422af71fbd2ca4f8;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/xt/extra/dbicadmin.t b/xt/extra/dbicadmin.t index cc79190..3f05ac2 100644 --- a/xt/extra/dbicadmin.t +++ b/xt/extra/dbicadmin.t @@ -1,18 +1,20 @@ -use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_admin_script'; - -use strict; -use warnings; - BEGIN { # just in case the user env has stuff in it delete $ENV{JSON_ANY_ORDER}; delete $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY}; + + do "./t/lib/ANFANG.pm" or die ( $@ || $! ) } +use strict; +use warnings; + +use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_admin_script'; + use Test::More; use Config; use File::Spec; -use lib qw(t/lib); + use DBICTest; $ENV{PATH} = ''; @@ -71,7 +73,7 @@ sub test_dbicadmin { my ($perl) = $^X =~ /(.*)/; - open(my $fh, "-|", ( $perl, '-MDBICTest::RunMode', 'script/dbicadmin', default_args(), qw|--op=select --attrs={"order_by":"name"}| ) ) or die $!; + open(my $fh, "-|", ( $perl, '-MANFANG', 'script/dbicadmin', default_args(), qw|--op=select --attrs={"order_by":"name"}| ) ) or die $!; my $data = do { local $/; <$fh> }; close($fh); if (!ok( ($data=~/Aran.*Trout/s), "$ENV{JSON_ANY_ORDER}: select with attrs" )) { @@ -101,7 +103,7 @@ sub default_args { sub test_exec { my ($perl) = $^X =~ /(.*)/; - my @args = ($perl, '-MDBICTest::RunMode', File::Spec->catfile(qw(script dbicadmin)), @_); + my @args = ($perl, '-MANFANG', File::Spec->catfile(qw(script dbicadmin)), @_); if ($^O eq 'MSWin32') { require Win32::ShellQuote; # included in test optdeps