[svn:dbd-oracle] r14591 - dbd-oracle/trunk/t
[email protected] Fri, 17 Dec 2010 13:05:33 -0800 (PST)
| Newsgroups | perl.dbd.oracle.changes |
|---|---|
| Message-ID | <[email protected]> |
Author: byterock
Date: Fri Dec 17 13:05:33 2010
New Revision: 14591
Modified:
dbd-oracle/trunk/t/26exe_array.t
dbd-oracle/trunk/t/28array_bind.t
dbd-oracle/trunk/t/31lob.t
dbd-oracle/trunk/t/51scroll.t
Log:
Fix for rt.cpan.org Ticket #=62152: t/28array_bind.t and t/31lob.t may call plan() twice and others do not fial on not connect from John Scoles
Modified: dbd-oracle/trunk/t/26exe_array.t
==============================================================================
--- dbd-oracle/trunk/t/26exe_array.t (original)
+++ dbd-oracle/trunk/t/26exe_array.t Fri Dec 17 13:05:33 2010
@@ -4,7 +4,7 @@
use DBD::Oracle qw(ORA_RSET SQLCS_NCHAR);
use strict;
-use Test::More tests =>17 ;
+use Test::More;
unshift @INC ,'t';
require 'nchar_test_lib.pl';
@@ -19,21 +19,28 @@
## an ASCII only DB
## ----------------------------------------------------------------------------
-BEGIN {
- use_ok('DBI');
-}
# create a database handle
my $dsn = oracle_test_dsn();
my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
$ENV{NLS_NCHAR} = "US7ASCII";
$ENV{NLS_LANG} = "AMERICAN";
-my $dbh = DBI->connect($dsn, $dbuser, '', { RaiseError=>1,
+my $dbh = DBI->connect($dsn, $dbuser, '', {
AutoCommit=>1,
PrintError => 0,
ora_envhp => 0,
});
+if ($dbh){
+ plan tests => 16;
+}
+else {
+
+ plan skip_all => "Not connected to oracle" if not $dbh;
+}
+
+
+
# check that our db handle is good
isa_ok($dbh, "DBI::db");
Modified: dbd-oracle/trunk/t/28array_bind.t
==============================================================================
--- dbd-oracle/trunk/t/28array_bind.t (original)
+++ dbd-oracle/trunk/t/28array_bind.t Fri Dec 17 13:05:33 2010
@@ -21,7 +21,7 @@
use DBI;
use DBD::Oracle qw(:ora_types ORA_OCI);
-use Test::More tests => 15;
+use Test::More;
unshift @INC ,'t';
require 'nchar_test_lib.pl';
@@ -238,6 +238,7 @@
$dbh = db_connect(0);
plan skip_all => "Not connected to oracle" if not $dbh;
+ plan tests => 15;
test_varchar2_table_3_tests($dbh);
test_number_table_3_tests($dbh);
Modified: dbd-oracle/trunk/t/31lob.t
==============================================================================
--- dbd-oracle/trunk/t/31lob.t (original)
+++ dbd-oracle/trunk/t/31lob.t Fri Dec 17 13:05:33 2010
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
-use Test::More tests => 12;
+use Test::More ;
use DBD::Oracle qw(:ora_types);
use DBI;
@@ -24,7 +24,7 @@
data BLOB
)
});
-
+plan tests => 12;
my ($stmt, $sth, $id, $loc);
## test with insert empty blob and select locator.
$stmt = "INSERT INTO $table (id,data) VALUES (1, EMPTY_BLOB())";
Modified: dbd-oracle/trunk/t/51scroll.t
==============================================================================
--- dbd-oracle/trunk/t/51scroll.t (original)
+++ dbd-oracle/trunk/t/51scroll.t Fri Dec 17 13:05:33 2010
@@ -1,7 +1,7 @@
#!/usr/bin/perl
use strict;
-use Test::More tests => 33;
+use Test::More;
use DBD::Oracle qw(:ora_types :ora_fetch_orient :ora_exe_modes);
use DBI;
@@ -16,16 +16,22 @@
## Nothing fancy.
## ----------------------------------------------------------------------------
-BEGIN {
- use_ok('DBI');
-}
# create a database handle
my $dsn = oracle_test_dsn();
my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
-my $dbh = DBI->connect($dsn, $dbuser, '', { RaiseError=>1,
- AutoCommit=>1,
- PrintError => 0 });
+my $dbh = DBI->connect($dsn, $dbuser, '', { AutoCommit=>1,
+ PrintError => 0 });
+
+
+if ($dbh){
+ plan tests => 33;
+}
+else {
+
+ plan skip_all => "Not connected to oracle" if not $dbh;
+}
+
ok ($dbh->{RowCacheSize} = 10);
# check that our db handle is good