From: Peter Rabbitson Date: Mon, 31 May 2010 15:21:20 +0000 (+0000) Subject: Skip failing tests on old DBD X-Git-Tag: v0.08122~45 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dd572bad5137c60cfeca4fcac04428d327bef21d;p=dbsrgits%2FDBIx-Class.git Skip failing tests on old DBD --- diff --git a/t/inflate/datetime_mssql.t b/t/inflate/datetime_mssql.t index 25524de..44984a3 100644 --- a/t/inflate/datetime_mssql.t +++ b/t/inflate/datetime_mssql.t @@ -1,5 +1,5 @@ use strict; -use warnings; +use warnings; use Test::More; use Test::Exception; @@ -36,6 +36,7 @@ my @connect_info = ( my $schema; +SKIP: for my $connect_info (@connect_info) { my ($dsn, $user, $pass) = @$connect_info; @@ -45,6 +46,15 @@ for my $connect_info (@connect_info) { on_connect_call => 'datetime_setup' }); + { + my $w; + local $SIG{__WARN__} = sub { $w = shift }; + $schema->storage->ensure_connected; + if ($w =~ /Your DBD::Sybase is too old to support DBIx::Class::InflateColumn::DateTime/) { + skip "Skipping tests on old DBD::Sybase " . DBD::Sybase->VERSION, 1; + } + } + my $guard = Scope::Guard->new(\&cleanup); # coltype, column, datehash