Force Perl 5.6.2 testing to behave.
David Wheeler
15 years ago
0 | 0 |
Revision history for Perl extension Exception::Class::DBI.
|
1 | 1 |
|
2 | 2 |
0.98
|
|
3 |
- Fixed strange test failures on Perl 5.6.2. Somehow tests are getting
|
|
4 |
run more than once, resulting in strange failures. I got 'round this
|
|
5 |
issue by putting an explicit `exit;` at the end of each test script.
|
|
6 |
Reported by David Cantrell.
|
3 | 7 |
|
4 | 8 |
0.97 2008-05-05T19:10:05
|
5 | 9 |
- Updated copyright.
|
61 | 61 |
is( $err->db_name, 'dummy', "Check db_name" );
|
62 | 62 |
is( $err->statement, 'select foo from foo', "Check statement" );
|
63 | 63 |
ok( ! defined $err->row_cache_size, "Check row_cache_size" );
|
|
64 |
|
|
65 |
# This keeps Perl 5.6.2 from trying to run tests again. I've no idea why it
|
|
66 |
# does that. :-(
|
|
67 |
exit;
|
7 | 7 |
use DBI;
|
8 | 8 |
|
9 | 9 |
eval {
|
10 | |
DBI->connect('dbi:Bogus', '', '',
|
11 | |
{ PrintError => 0,
|
12 | |
RaiseError => 0,
|
13 | |
HandleError => Exception::Class::DBI->handler
|
14 | |
});
|
|
10 |
DBI->connect( 'dbi:Bogus', '', '', {
|
|
11 |
PrintError => 0,
|
|
12 |
RaiseError => 0,
|
|
13 |
HandleError => Exception::Class::DBI->handler
|
|
14 |
});
|
15 | 15 |
};
|
16 | 16 |
|
17 | 17 |
ok( my $err = $@, "Catch exception" );
|
|
63 | 63 |
}
|
64 | 64 |
}
|
65 | 65 |
}
|
|
66 |
|
|
67 |
# This keeps Perl 5.6.2 from trying to run tests again. I've no idea why it
|
|
68 |
# does that. :-(
|
|
69 |
exit;
|
48 | 48 |
ok( ! $err->long_trunc_ok, "Check long_trunc_ok" );
|
49 | 49 |
ok( ! $err->taint, "Check taint" );
|
50 | 50 |
}
|
|
51 |
|
|
52 |
# This keeps Perl 5.6.2 from trying to run tests again. I've no idea why it
|
|
53 |
# does that. :-(
|
|
54 |
exit;
|
78 | 78 |
ok( ! defined $err->cursor_name, "Check cursor_name" );
|
79 | 79 |
is( $err->statement, 'select * from foo', 'Check statement' );
|
80 | 80 |
ok( ! defined $err->rows_in_cache, "Check rows_in_cache" );
|
|
81 |
|
|
82 |
# This keeps Perl 5.6.2 from trying to run tests again. I've no idea why it
|
|
83 |
# does that. :-(
|
|
84 |
exit;
|
46 | 46 |
|
47 | 47 |
# Trigger an exception.
|
48 | 48 |
eval {
|
49 | |
my $sth = $dbh->prepare("select * from foo");
|
|
49 |
my $sth = $dbh->prepare('select * from foo');
|
50 | 50 |
$sth->execute;
|
51 | 51 |
};
|
52 | 52 |
|
|
57 | 57 |
isa_ok $err, 'Exception::Class::DBI::STH', 'The exception';
|
58 | 58 |
isa_ok $err, 'MyApp::Ex::DBI::STH', 'The exception';
|
59 | 59 |
isa_ok $err, 'MyApp::Ex::DBI', 'The exception';
|
|
60 |
|
|
61 |
# This keeps Perl 5.6.2 from trying to run tests again. I've no idea why it
|
|
62 |
# does that. :-(
|
|
63 |
exit;
|