Author: turnstep
Date: Wed Jan 16 19:38:02 2008
New Revision: 10573
Modified:
DBD-Pg/trunk/t/01connect.t
DBD-Pg/trunk/t/09arrays.t
Log:
Remove unwanted BAIL_OUTs
Modified: DBD-Pg/trunk/t/01connect.t
==============================================================================
--- DBD-Pg/trunk/t/01connect.t (original)
+++ DBD-Pg/trunk/t/01connect.t Wed Jan 16 19:38:02 2008
@@ -7,15 +7,17 @@
use warnings;
use DBI;
use DBD::Pg;
-use Test::More tests => 15;
+use Test::More;
select(($|=1,select(STDERR),$|=1)[1]);
## Define this here in case we get to the END block before a connection is
made.
my ($pgversion,$pglibversion,$pgvstring,$pgdefport) = ('?','?','?','?');
my $bail = 0;
-if (!defined $ENV{DBI_DSN}) {
- BAIL_OUT 'Cannot run tests unless DBI_DSN is defined. See the README
file';
+if (defined $ENV{DBI_DSN}){
+ plan tests => 15;
+} else {
+ plan skip_all => 'Cannot run test unless DBI_DSN is defined. See the
README file';
}
# Trapping a connection error can be tricky, but we only have to do it
Modified: DBD-Pg/trunk/t/09arrays.t
==============================================================================
--- DBD-Pg/trunk/t/09arrays.t (original)
+++ DBD-Pg/trunk/t/09arrays.t Wed Jan 16 19:38:02 2008
@@ -255,7 +255,6 @@
$qexpected =~ s/\\\\"/\\"/g;
$qexpected =~ s/\\\\i/\\i/g;
$expected = eval $qexpected;
- $@ and BAIL_OUT "Eval failed ($@) for $expected\n";
is_deeply($result, $expected, "Correct array inserted: $msg :
$input");
}
@@ -273,7 +272,7 @@
}
my $array_tests_out =
-qq!1
+q!1
[1]
Simple test of single array element
@@ -440,7 +439,6 @@
}
else {
$expected = eval $expected;
- $@ and BAIL_OUT "Eval failed ($@) for $expected\n";
## is_deeply does not handle type differences
is((Dumper $result), (Dumper $expected), "Array test $msg :
$input");
}