On Mon, Jun 06, 2005 at 08:20:05AM -0400, Lincoln A. Baxter wrote: > On Mon, 2005-06-06 at 10:48 +0200, Honza Pazdziora wrote: > > > Please let me know if I should do some more tests for other rare > > types of 10g. If you give me a hint how 10g-specific tests should be > > done in t/*.t, I can provide some additions to the test suite as > > well. > > > > There are a number of tests that test the oracle version already in > t/. > > Look at: > > 25plsql.t: my $ora_server_version = $dbh->func("ora_server_version"); > 25plsql.t: if DBD::Oracle::ORA_OCI() < 9.0 || $ora_server_version < 9.8; > > and > > nchar_test_lib.pl: my $ora_server_version = join ".", > @{$dbh->func("ora_server_version")||[]};
You are right. How about --- t/20select.t.orig 2005-06-06 15:10:03.000000000 +0200 +++ t/20select.t 2005-06-06 15:09:21.000000000 +0200 @@ -54,7 +54,7 @@ my $sz = 8; my $tests = 2; -my $tests_per_set = 11; +my $tests_per_set = 12; $tests += @test_sets * $tests_per_set; print "1..$tests\n"; @@ -107,6 +107,15 @@ ok(0, $tmp->[2][1] =~ m/$data2/, cdif($tmp->[2][1], $data2, "Len ".length($tmp->[2][1])) ); + my $ora_server_version = $dbh->func("ora_server_version"); + if ($ora_server_version < 10) { + ok(0, 1, 1); # skip + } else { + my $data = $dbh->selectrow_array(q! + select to_dsinterval(?) from dual + !, {}, "1 07:00:00"); + ok (0, (defined $data and $data eq '+000000001 07:00:00.000000000'), 1); + } } # end of run_select_tests then? t/20select.t does not have Test::More and its ok clashes with the ok defined in 20select.t, so I simply ok(0, 1, 1)ed for older versions of server. -- ------------------------------------------------------------------------ Honza Pazdziora | [EMAIL PROTECTED] | http://www.fi.muni.cz/~adelton/ .project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ... Only self-confident people can be simple.