Author: turnstep
Date: Fri Oct 1 20:39:41 2010
New Revision: 14453
Modified:
DBD-Pg/trunk/t/02attribs.t
DBD-Pg/trunk/t/03smethod.t
DBD-Pg/trunk/t/04misc.t
DBD-Pg/trunk/t/06bytea.t
DBD-Pg/trunk/t/07copy.t
DBD-Pg/trunk/t/08async.t
DBD-Pg/trunk/t/09arrays.t
DBD-Pg/trunk/t/12placeholders.t
DBD-Pg/trunk/t/20savepoints.t
DBD-Pg/trunk/t/99cleanup.t
Log:
Bail early on tests for empty dbh as well as undefined.
Modified: DBD-Pg/trunk/t/02attribs.t
==============================================================================
--- DBD-Pg/trunk/t/02attribs.t (original)
+++ DBD-Pg/trunk/t/02attribs.t Fri Oct 1 20:39:41 2010
@@ -15,7 +15,7 @@
my ($helpconnect,$connerror,$dbh) = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 249;
Modified: DBD-Pg/trunk/t/03smethod.t
==============================================================================
--- DBD-Pg/trunk/t/03smethod.t (original)
+++ DBD-Pg/trunk/t/03smethod.t Fri Oct 1 20:39:41 2010
@@ -17,7 +17,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 96;
Modified: DBD-Pg/trunk/t/04misc.t
==============================================================================
--- DBD-Pg/trunk/t/04misc.t (original)
+++ DBD-Pg/trunk/t/04misc.t Fri Oct 1 20:39:41 2010
@@ -15,7 +15,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 54;
Modified: DBD-Pg/trunk/t/06bytea.t
==============================================================================
--- DBD-Pg/trunk/t/06bytea.t (original)
+++ DBD-Pg/trunk/t/06bytea.t Fri Oct 1 20:39:41 2010
@@ -14,7 +14,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 11;
Modified: DBD-Pg/trunk/t/07copy.t
==============================================================================
--- DBD-Pg/trunk/t/07copy.t (original)
+++ DBD-Pg/trunk/t/07copy.t Fri Oct 1 20:39:41 2010
@@ -13,7 +13,7 @@
my $dbh = connect_database();
-if (defined $dbh) {
+if ($dbh) {
plan tests => 55;
}
else {
Modified: DBD-Pg/trunk/t/08async.t
==============================================================================
--- DBD-Pg/trunk/t/08async.t (original)
+++ DBD-Pg/trunk/t/08async.t Fri Oct 1 20:39:41 2010
@@ -14,7 +14,7 @@
my $dbh = connect_database();
-if (!defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
Modified: DBD-Pg/trunk/t/09arrays.t
==============================================================================
--- DBD-Pg/trunk/t/09arrays.t (original)
+++ DBD-Pg/trunk/t/09arrays.t Fri Oct 1 20:39:41 2010
@@ -15,7 +15,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 257;
Modified: DBD-Pg/trunk/t/12placeholders.t
==============================================================================
--- DBD-Pg/trunk/t/12placeholders.t (original)
+++ DBD-Pg/trunk/t/12placeholders.t Fri Oct 1 20:39:41 2010
@@ -14,7 +14,7 @@
my $dbh = connect_database();
-if (! defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 235;
Modified: DBD-Pg/trunk/t/20savepoints.t
==============================================================================
--- DBD-Pg/trunk/t/20savepoints.t (original)
+++ DBD-Pg/trunk/t/20savepoints.t Fri Oct 1 20:39:41 2010
@@ -13,7 +13,7 @@
my $dbh = connect_database();
-if (!defined $dbh) {
+if (! $dbh) {
plan skip_all => 'Connection to database failed, cannot continue
testing';
}
plan tests => 3;
Modified: DBD-Pg/trunk/t/99cleanup.t
==============================================================================
--- DBD-Pg/trunk/t/99cleanup.t (original)
+++ DBD-Pg/trunk/t/99cleanup.t Fri Oct 1 20:39:41 2010
@@ -15,7 +15,7 @@
my $dbh = connect_database({nosetup => 1, nocreate => 1, norestart => 1});
SKIP: {
- if (! defined $dbh) {
+ if (! $dbh) {
skip ('Connection to database failed, cannot cleanup', 1);
}