]> git.decadent.org.uk Git - maypole.git/blobdiff - t/db_colinfo.t
new compilation test
[maypole.git] / t / db_colinfo.t
index 2b341eb699c1a6e279ce2c25b2c253c8da47c390..8f38f3bea85b3b901807b81f029a5be019ace354 100755 (executable)
@@ -1,9 +1,17 @@
 #!/usr/bin/perl -w
 use Test::More;
 use Data::Dumper;
-use lib 'ex'; # Where BeerDB should live
+use DBI;
+use lib 'examples'; # Where BeerDB should live
 BEGIN {
-   plan tests => 65;
+       my $drh = eval {
+         DBI->install_driver("mysql");
+         my @databases = DBI->data_sources("mysql");
+         die "couldn't connect to mysql" unless (@databases);
+       };
+       warn "error : $@ \n" if ($@);
+        my $testcount = ($@) ? 45 : 65 ;
+        plan tests => $testcount;
 }
 
 $db            = 'test';