0 | 0 |
#!/usr/bin/perl -w
|
1 | 1 |
|
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 $
|
3 | 3 |
|
4 | 4 |
use strict;
|
5 | 5 |
use Test::More (tests => 27);
|
|
38 | 38 |
ok( ! defined $err->retval, "Check retval" );
|
39 | 39 |
ok( $err->warn == 1, "Check warn" );
|
40 | 40 |
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" );
|
45 | 48 |
ok( $err->active_kids == 0, "Check active_kids" );
|
46 | 49 |
ok( ! $err->inactive_destroy, "Check inactive_destroy" );
|
47 | 50 |
ok( $err->trace_level == 0, "Check trace_level" );
|