diff options
author | cvs2git <cvs2git> | 2006-08-23 22:25:40 +0000 |
---|---|---|
committer | cvs2git <cvs2git> | 2006-08-23 22:25:40 +0000 |
commit | 58d093219cf60264550b8c34649d9f3190eda042 (patch) | |
tree | 10418dd70b52416a5f52da8e17d8e282d914595d /install/5.005/DBD-Pg-1.22-fixvercmp/t/03bind.t | |
parent | 3ce7691203a7737406bf2d4442f7fd84b81f847e (diff) |
This commit was manufactured by cvs2svn to create tagAFTER_FINAL_MASONIZE
'AFTER_FINAL_MASONIZE'.
Diffstat (limited to 'install/5.005/DBD-Pg-1.22-fixvercmp/t/03bind.t')
-rw-r--r-- | install/5.005/DBD-Pg-1.22-fixvercmp/t/03bind.t | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/install/5.005/DBD-Pg-1.22-fixvercmp/t/03bind.t b/install/5.005/DBD-Pg-1.22-fixvercmp/t/03bind.t deleted file mode 100644 index df7c8843e..000000000 --- a/install/5.005/DBD-Pg-1.22-fixvercmp/t/03bind.t +++ /dev/null @@ -1,85 +0,0 @@ -use strict; -use DBI; -use Test::More; - -if (defined $ENV{DBI_DSN}) { - plan tests => 11; -} else { - plan skip_all => 'cannot test without DB info'; -} - -my $dbh = DBI->connect($ENV{DBI_DSN}, $ENV{DBI_USER}, $ENV{DBI_PASS}, - {RaiseError => 1, AutoCommit => 0} - ); -ok(defined $dbh, - 'connect with transaction' - ); - -my $sql = <<SQL; - SELECT id - , name - FROM test - WHERE id = ? -SQL -my $sth = $dbh->prepare($sql); -ok(defined $sth, - "prepare: $sql" - ); - -ok($sth->bind_param(1, 'foo'), - 'bind int column with string' - ); - -ok($sth->bind_param(1, 1), - 'rebind int column with int' - ); - -$sql = <<SQL; - SELECT id - , name - FROM test - WHERE id = ? - AND name = ? -SQL -$sth = $dbh->prepare($sql); -ok(defined $sth, - "prepare: $sql" - ); - -ok($sth->bind_param(1, 'foo'), - 'bind int column with string', - ); -ok($sth->bind_param(2, 'bar'), - 'bind string column with text' - ); -ok($sth->bind_param(2, 'baz'), - 'rebind string column with text' - ); - -ok($sth->finish(), - 'finish' - ); - -# Make sure that we get warnings when we try to use SQL_BINARY. -{ - local $SIG{__WARN__} = - sub { ok($_[0] =~ /^Use of SQL type SQL_BINARY/, - 'warning with SQL_BINARY' - ); - }; - - $sql = <<SQL; - SELECT id - , name - FROM test - WHERE id = ? - AND name = ? -SQL - $sth = $dbh->prepare($sql); - - $sth->bind_param(1, 'foo', DBI::SQL_BINARY); -} - -ok($dbh->disconnect(), - 'disconnect' - ); |