X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fdatetime_msaccess.t;h=fdd2284b8690eda7e8c88cd07c7e90ba2f84d0e9;hb=2b3fc4088d96e40ac23b3871b26d4a1faff17aed;hp=7f62e4ea2bb7a0864efb4c8f3248c2526a4d6e61;hpb=726c8f65ef37b47aad62e29a306f64528a00f65d;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/inflate/datetime_msaccess.t b/t/inflate/datetime_msaccess.t index 7f62e4e..fdd2284 100644 --- a/t/inflate/datetime_msaccess.t +++ b/t/inflate/datetime_msaccess.t @@ -5,19 +5,31 @@ use Test::More; use Test::Exception; use Scope::Guard (); use Try::Tiny; +use DBIx::Class::Optional::Dependencies (); use lib qw(t/lib); use DBICTest; my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSACCESS_ODBC_${_}" } qw/DSN USER PASS/}; my ($dsn2, $user2, $pass2) = @ENV{map { "DBICTEST_MSACCESS_ADO_${_}" } qw/DSN USER PASS/}; +plan skip_all => 'Test needs ' . + (join ' and ', map { $_ ? $_ : () } + DBIx::Class::Optional::Dependencies->req_missing_for('test_dt'), + (join ' or ', map { $_ ? $_ : () } + DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_odbc'), + DBIx::Class::Optional::Dependencies->req_missing_for('test_rdbms_msaccess_ado'))) + unless + DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt') && ( + $dsn && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_odbc') + or + $dsn2 && DBIx::Class::Optional::Dependencies->req_ok_for('test_rdbms_msaccess_ado')) + or (not $dsn || $dsn2); + plan skip_all => <<'EOF' unless $dsn || $dsn2; -Set $ENV{DBICTEST_MSACCESS_ODBC_DSN} and/or $ENV{DBICTEST_MSACCESS_ADO_DSN} (and optionally _USER and _PASS) to run these tests.\nWarning: this test drops and creates the table 'track'. +Set $ENV{DBICTEST_MSACCESS_ODBC_DSN} and/or $ENV{DBICTEST_MSACCESS_ADO_DSN} (and optionally _USER and _PASS) to run these tests. +Warning: this test drops and creates the table 'track'. EOF -plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_dt') - unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_dt'); - my @connect_info = ( [ $dsn, $user || '', $pass || '' ], [ $dsn2, $user2 || '', $pass2 || '' ],