summaryrefslogtreecommitdiff
path: root/t/25-sql.t
diff options
context:
space:
mode:
Diffstat (limited to 't/25-sql.t')
-rw-r--r--t/25-sql.t25
1 files changed, 16 insertions, 9 deletions
diff --git a/t/25-sql.t b/t/25-sql.t
index 6f6d8d0..3cb85ab 100644
--- a/t/25-sql.t
+++ b/t/25-sql.t
@@ -3,15 +3,6 @@ use warnings;
use Test::More;
use File::Spec;
-# DBD::DBM uses SQL::Statement if available
-# but SQL::Statement versions > 1.20 make the test fail
-# (see RT #56463, #56561)
-BEGIN {
- if ( eval { require SQL::Statement; $SQL::Statement::VERSION > 1.20; } ) {
- $ENV{DBI_SQL_NANO} = 1;
- }
-}
-
use Test::Database;
my @drivers = Test::Database->drivers();
@@ -20,6 +11,22 @@ my @drivers = Test::Database->drivers();
grep { $name eq $_ } @ARGV
} @drivers if @ARGV;
+# DBD::DBM uses SQL::Statement if available
+# but SQL::Statement versions > 1.20 make the test fail
+# (see RT #56463, #56561)
+if (eval {
+ require SQL::Statement;
+ diag "SQL::Statement $SQL::Statement::VERSION";
+ $SQL::Statement::VERSION > 1.20;
+ }
+ )
+{
+ my $skip_DBM = 0;
+ @drivers = grep { !( $_->name() eq 'DBM' and $skip_DBM = 1 ) } @drivers;
+ diag "skipping DBM tests because of SQL::Statement bug"
+ if $skip_DBM;
+}
+
plan skip_all => 'No drivers available for testing' if !@drivers;
# some SQL statements to try out