Codebase list libexception-class-dbi-perl / d7ab2d0
Fixed test failure due to l10n. David Wheeler 17 years ago
2 changed file(s) with 6 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Perl extension Exception::Class::DBI.
11
22 0.95
3 - Fixed test failure for localized error messages. Reported by Jens
4 Maier with a fix from Daniel Brook.
35
46 0.94 2006-06-30T00:04:32
57 - The handler() method now always returns the same code referernce
00 #!/usr/bin/perl -w
11
2 # $Id: sth.t,v 1.8 2004/06/17 17:43:29 david Exp $
2 # $Id$
33
44 use strict;
55 use Test::More (tests => 35);
2828
2929 # Make sure we got the proper exception.
3030 ok( my $err = $@, "Get exception" );
31 my $bang = $!;
3132 isa_ok( $err, 'Exception::Class::DBI' );
3233 isa_ok( $err, 'Exception::Class::DBI::H' );
3334 isa_ok( $err, 'Exception::Class::DBI::STH' );
3435
3536 ok( $err->err == 2, "Check err" );
36 is( $err->errstr, 'opendir(foo): No such file or directory',
37 is( $err->errstr, "opendir(foo): $bang",
3738 "Check errstr" );
3839 like( $err->error,
39 qr/^DBD::ExampleP::st execute failed: opendir\(foo\): No such file or directory/,
40 qr/^DBD::ExampleP::st execute failed: opendir\(foo\): \E$bang/,
4041 "Check error" );
4142 is( $err->state, 'S1000', "Check state" );
4243 ok( ! defined $err->retval, "Check retval" );