Home > Archive > Oracle PERL DBD > January 2006 > [svn:dbd-oracle] r2420 - dbd-oracle/trunk/t









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [svn:dbd-oracle] r2420 - dbd-oracle/trunk/t
timbo@cvs.perl.org

2006-01-16, 8:25 pm

Author: timbo
Date: Mon Jan 16 13:14:49 2006
New Revision: 2420

Modified:
dbd-oracle/trunk/t/40ph_type.t
Log:
Tidy up ph_type tests


Modified: dbd-oracle/trunk/t/40ph_type.t
====================
====================
====================
==================
--- dbd-oracle/trunk/t/40ph_type.t (original)
+++ dbd-oracle/trunk/t/40ph_type.t Mon Jan 16 13:14:49 2006
@@ -45,17 +45,21 @@ eval {
$Data::Dumper::Inden
t= $Data::Dumper::Inden
t=1;
};

-# XXX ought to extend test to check 'blank padded comparision semantics'
-my @tests = ( # skip=1 to skip, ti=N to trace insert, ts=N to trace select
- { type=>97, name=>"CHARZ", chops_space=>0, embed_nul=>0, skip=>1, ti=>8 },
- { type=> 5, name=>"STRING", chops_space=>0, embed_nul=>0, skip=>1, ti=>8 }, # old Oraperl
- { type=>96, name=>"CHAR", chops_space=>0, embed_nul=>1, skip=>0 },
- { type=> 1, name=>"VARCHAR2", chops_space=>1, embed_nul=>1, skip=>0 }, # current DBD::Oracle
-# { type=> 2, name=>"NVARCHAR2", chops_space=>1, embed_nul=>1, skip=>0 }, # LAB NVARCHAR nope not here
+# XXX ought to extend tests to check 'blank padded comparision semantics'
+my @tests = (
+ # type: oracle internal type to use for placeholder values
+ # name: oracle name for type above
+ # chops_space: set true if type trims trailing space characters
+ # embed_nul: set true if type allows embedded nul characters
+ # (also SKIP=1 to skip test, ti=N to trace insert, ts=N to trace select)
+ { type=> 1, name=>"VARCHAR2", chops_space=>1, embed_nul=>1, }, # current DBD::Oracle
+ { type=> 5, name=>"STRING", chops_space=>0, embed_nul=>0, SKIP=>1, ti=>8 }, # old Oraperl
+ { type=>96, name=>"CHAR", chops_space=>0, embed_nul=>1, },
+ { type=>97, name=>"CHARZ", chops_space=>0, embed_nul=>0, SKIP=>1, ti=>8 },
);

$tests = 3;
-$_->{skip} or $tests+=8 for @tests;
+$_->{SKIP} or $tests+=8 for @tests;

print "1..$tests\n";

@@ -74,14 +78,14 @@ my $val_with_trailing_s
pace = "trailing
my $val_with_embedded_n
ul = "embedded\0nul";

for my $test_info (@tests) {
- next if $test_info->{skip};
+ next if $test_info->{SKIP};

my $ph_type = $test_info->{type} || die;
my $name = $test_info->{name} || die;
print "#\n";
print "# testing @{[ %$test_info ]} ...\n";
print "#\n";
- if ($test_info->{skip}) {
+ if ($test_info->{SKIP}) {
print "# skipping tests\n";
foreach (1..12) { ok(0,1) }
next;
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com