Codebase list libexception-class-dbi-perl / c02fda8
Fixed testing on Perl 5.6.1 and earlier (I hope!). David Wheeler 21 years ago
2 changed file(s) with 9 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
11
22 0.02
33 - Documentation tweaks.
4 - Fixed test to pass with Perl 5.6.1 and earlier.
45
56 0.01 Fri Aug 23 19:50:45 2002
67 - Initial Release to the CPAN.
00 #!/usr/bin/perl -w
11
2 # $Id: dbh.t,v 1.4 2002/08/25 16:18:29 david Exp $
2 # $Id: dbh.t,v 1.5 2002/09/17 03:32:47 david Exp $
33
44 use strict;
55 use Test::More (tests => 27);
3838 ok( ! defined $err->retval, "Check retval" );
3939 ok( $err->warn == 1, "Check warn" );
4040 ok( $err->active == 1, "Check active" );
41 # For some reason, $dbh->{Kids} returns a different value on Linux than
42 # elsewhere. The same might be true on other platforms. Not sure why that
43 # is...
44 ok( $err->kids == ($^O eq 'linux' ? 1 : 0), "Check kids" );
41 # For some reason, under perl < 5.8.0, $dbh->{Kids} returns a different value
42 # inside the HandleError scope than it does outside that scope. So we're
43 # checking for the perl version here to cover our butts on this test. This may
44 # be fixed in the DBI soon. I'm using the old form of the Perl version number
45 # as it seems safer with older Perls.
46 #ok( $err->kids == ($^V lt v5.8 ? 1 : 0), "Check kids" );
47 ok( $err->kids == ($] < 5.008 ? 1 : 0), "Check kids" );
4548 ok( $err->active_kids == 0, "Check active_kids" );
4649 ok( ! $err->inactive_destroy, "Check inactive_destroy" );
4750 ok( $err->trace_level == 0, "Check trace_level" );