Codebase list libexception-class-dbi-perl / c510643
Force Perl 5.6.2 testing to behave. David Wheeler 15 years ago
6 changed file(s) with 30 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Perl extension Exception::Class::DBI.
11
22 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.
37
48 0.97 2008-05-05T19:10:05
59 - Updated copyright.
6161 is( $err->db_name, 'dummy', "Check db_name" );
6262 is( $err->statement, 'select foo from foo', "Check statement" );
6363 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;
77 use DBI;
88
99 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 });
1515 };
1616
1717 ok( my $err = $@, "Catch exception" );
6363 }
6464 }
6565 }
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;
4848 ok( ! $err->long_trunc_ok, "Check long_trunc_ok" );
4949 ok( ! $err->taint, "Check taint" );
5050 }
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;
7878 ok( ! defined $err->cursor_name, "Check cursor_name" );
7979 is( $err->statement, 'select * from foo', 'Check statement' );
8080 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;
4646
4747 # Trigger an exception.
4848 eval {
49 my $sth = $dbh->prepare("select * from foo");
49 my $sth = $dbh->prepare('select * from foo');
5050 $sth->execute;
5151 };
5252
5757 isa_ok $err, 'Exception::Class::DBI::STH', 'The exception';
5858 isa_ok $err, 'MyApp::Ex::DBI::STH', 'The exception';
5959 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;