Author: turnstep
Date: Fri Sep 19 09:22:29 2008
New Revision: 11832
Modified:
DBD-Pg/trunk/t/01connect.t
DBD-Pg/trunk/t/dbdpg_test_setup.pl
Log:
Don't create a new database if the quoting test fails.
Allow dashes in the database name when quoting. Should be expanded.
Modified: DBD-Pg/trunk/t/01connect.t
==============================================================================
--- DBD-Pg/trunk/t/01connect.t (original)
+++ DBD-Pg/trunk/t/01connect.t Fri Sep 19 09:22:29 2008
@@ -89,7 +89,7 @@
$t=q{Connect using a quoted database argument};
eval {
$dbh and $dbh->disconnect();
- (undef,$err,$dbh) = connect_database({dbquotes => 1});
+ (undef,$err,$dbh) = connect_database({dbquotes => 1, nocreate => 1});
};
is ($@, q{}, $t);
}
Modified: DBD-Pg/trunk/t/dbdpg_test_setup.pl
==============================================================================
--- DBD-Pg/trunk/t/dbdpg_test_setup.pl (original)
+++ DBD-Pg/trunk/t/dbdpg_test_setup.pl Fri Sep 19 09:22:29 2008
@@ -82,7 +82,7 @@
$testdsn =~ s/$alias\s*=/$arg->{dbreplace}=/;
}
if ($arg->{dbquotes}) {
- $testdsn =~ s/$alias\s*=(\w+)/'db="'.lc $2.'"'/e;
+ $testdsn =~ s/$alias\s*=([\-\w]+)/'db="'.lc $2.'"'/e;
}
goto GOTDBH if eval {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.