X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Finflate%2Fdatetime_oracle.t;h=d118a0c6ec24333bdc61b14fb7dd8cdc036c53f0;hb=994dc91b510ccb6d25438bd2dd0e308a0a46d4c5;hp=40fa59ad134bff02f11f29e15045f5eea1965efe;hpb=2d124f0104ab775c3db4e272940cebb0b7111ea2;p=dbsrgits%2FDBIx-Class.git diff --git a/t/inflate/datetime_oracle.t b/t/inflate/datetime_oracle.t index 40fa59a..d118a0c 100644 --- a/t/inflate/datetime_oracle.t +++ b/t/inflate/datetime_oracle.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use lib qw(t/lib); @@ -11,20 +11,16 @@ if (not ($dsn && $user && $pass)) { plan skip_all => 'Set $ENV{DBICTEST_ORA_DSN}, _USER and _PASS to run this test. ' . 'Warning: This test drops and creates a table called \'track\''; } -else { - eval "use DateTime; use DateTime::Format::Oracle;"; - if ($@) { - plan skip_all => 'needs DateTime and DateTime::Format::Oracle for testing'; - } - else { - plan tests => 10; - } -} + +plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for ('test_rdbms_oracle') + unless DBIx::Class::Optional::Dependencies->req_ok_for ('test_rdbms_oracle'); # DateTime::Format::Oracle needs this set $ENV{NLS_DATE_FORMAT} = 'DD-MON-YY'; $ENV{NLS_TIMESTAMP_FORMAT} = 'YYYY-MM-DD HH24:MI:SSXFF'; $ENV{NLS_LANG} = 'AMERICAN_AMERICA.WE8ISO8859P1'; +$ENV{NLS_SORT} = "BINARY"; +$ENV{NLS_COMP} = "BINARY"; my $schema = DBICTest::Schema->connect($dsn, $user, $pass); @@ -94,6 +90,8 @@ is( $track->last_updated_at, $timestamp, 'DateTime round-trip as TIMESTAMP' ); is( int $track->last_updated_at->nanosecond, int 500_000_000, 'TIMESTAMP nanoseconds survived' ); +done_testing; + # clean up our mess END { if($schema && ($dbh = $schema->storage->dbh)) {