Fixed test failure due to l10n.
David Wheeler
17 years ago
0 | 0 |
Revision history for Perl extension Exception::Class::DBI.
|
1 | 1 |
|
2 | 2 |
0.95
|
|
3 |
- Fixed test failure for localized error messages. Reported by Jens
|
|
4 |
Maier with a fix from Daniel Brook.
|
3 | 5 |
|
4 | 6 |
0.94 2006-06-30T00:04:32
|
5 | 7 |
- The handler() method now always returns the same code referernce
|
0 | 0 |
#!/usr/bin/perl -w
|
1 | 1 |
|
2 | |
# $Id: sth.t,v 1.8 2004/06/17 17:43:29 david Exp $
|
|
2 |
# $Id$
|
3 | 3 |
|
4 | 4 |
use strict;
|
5 | 5 |
use Test::More (tests => 35);
|
|
28 | 28 |
|
29 | 29 |
# Make sure we got the proper exception.
|
30 | 30 |
ok( my $err = $@, "Get exception" );
|
|
31 |
my $bang = $!;
|
31 | 32 |
isa_ok( $err, 'Exception::Class::DBI' );
|
32 | 33 |
isa_ok( $err, 'Exception::Class::DBI::H' );
|
33 | 34 |
isa_ok( $err, 'Exception::Class::DBI::STH' );
|
34 | 35 |
|
35 | 36 |
ok( $err->err == 2, "Check err" );
|
36 | |
is( $err->errstr, 'opendir(foo): No such file or directory',
|
|
37 |
is( $err->errstr, "opendir(foo): $bang",
|
37 | 38 |
"Check errstr" );
|
38 | 39 |
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/,
|
40 | 41 |
"Check error" );
|
41 | 42 |
is( $err->state, 'S1000', "Check state" );
|
42 | 43 |
ok( ! defined $err->retval, "Check retval" );
|