diff --git a/Changes b/Changes index 3f9cbe5..97854bb 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for Perl extension Exception::Class::DBI. 0.95 + - Fixed test failure for localized error messages. Reported by Jens + Maier with a fix from Daniel Brook. 0.94 2006-06-30T00:04:32 - The handler() method now always returns the same code referernce diff --git a/t/sth.t b/t/sth.t index f58baeb..0ac88e0 100644 --- a/t/sth.t +++ b/t/sth.t @@ -1,6 +1,6 @@ #!/usr/bin/perl -w -# $Id: sth.t,v 1.8 2004/06/17 17:43:29 david Exp $ +# $Id$ use strict; use Test::More (tests => 35); @@ -29,15 +29,16 @@ # Make sure we got the proper exception. ok( my $err = $@, "Get exception" ); +my $bang = $!; isa_ok( $err, 'Exception::Class::DBI' ); isa_ok( $err, 'Exception::Class::DBI::H' ); isa_ok( $err, 'Exception::Class::DBI::STH' ); ok( $err->err == 2, "Check err" ); -is( $err->errstr, 'opendir(foo): No such file or directory', +is( $err->errstr, "opendir(foo): $bang", "Check errstr" ); like( $err->error, - qr/^DBD::ExampleP::st execute failed: opendir\(foo\): No such file or directory/, + qr/^DBD::ExampleP::st execute failed: opendir\(foo\): \E$bang/, "Check error" ); is( $err->state, 'S1000', "Check state" ); ok( ! defined $err->retval, "Check retval" );