On Wed, Oct 26, 2005 at 10:06:32AM -0400, Eric Lenio wrote:
> On Mon, Oct 17, 2005 at 05:41:20PM +0100, Tim Bunce wrote:
> > >
> > > Sure thing... do you want tests around $sth->{PRECISION} in general, or
> > > tests
> > > specific to this patch?
> >
> > Feel free to add tests for anything and everything that takes your fancy!
>
> Tim, I added 3 new tests around $sth->{PRECISION} in the attached diff
> file (originally from DBD::Oracle 1.16). This tests an integer column
> (PRECISION of 38 in my environment), a character column (PRECISION of
> 10), and a date column (PRECISION of 75).
>
> One thing I'm not sure of: are these tests valid across all OS's and
> Oracle environments? If anyone can try these tests out on non-Solaris
> systems (with Oracle 9.2.0.4) that would be great. Or point out the
> flaws in this approach to test, and I can try to amend the patch.
Thanks Eric.
Tim.
> --- t/20select.t.orig Tue Oct 25 23:49:50 2005
> +++ t/20select.t Wed Oct 26 09:55:01 2005
> @@ -54,7 +54,7 @@
> my $sz = 8;
>
> my $tests = 2;
> -my $tests_per_set = 11;
> +my $tests_per_set = 14;
> $tests += @test_sets * $tests_per_set;
> print "1..$tests\n";
>
> @@ -107,6 +107,13 @@
> ok(0, $tmp->[2][1] =~ m/$data2/,
> cdif($tmp->[2][1], $data2, "Len ".length($tmp->[2][1])) );
>
> + # 10/25/2005 lenio: adding tests around $sth->{PRECISION}:
> + # 1st column, an integer, should have PRECISION of 38
> + ok(0, $sth->{PRECISION}->[0] == 38);
> + # 2nd column, character type, should have PRECISION of 10
> + ok(0, $sth->{PRECISION}->[1] == 10);
> + # 3rd column, date type, should have PRECISION of 75
> + ok(0, $sth->{PRECISION}->[2] == 75);
>
> } # end of run_select_tests
>