You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by st...@apache.org on 2002/07/06 14:16:14 UTC
cvs commit: modperl-2.0/t/response/TestAPR perlio.pm
stas 2002/07/06 05:16:14
Modified: t/response/TestAPR perlio.pm
Log:
make the error messages comparison work under locale
Submitted by: Tatsuhiko Miyagawa <mi...@edge.co.jp>
Revision Changes Path
1.14 +6 -1 modperl-2.0/t/response/TestAPR/perlio.pm
Index: perlio.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- perlio.pm 21 Jun 2002 22:21:37 -0000 1.13
+++ perlio.pm 6 Jul 2002 12:16:14 -0000 1.14
@@ -58,6 +58,11 @@
# open() failure test
{
+ # workaround for locale setups where the error message may be
+ # in a different language
+ open my $fh, "perlio_this_file_cannot_exist";
+ my $errno_string = "$!";
+
# non-existant file
my $file = "/this/file/does/not/exist";
if (open my $fh, "<:APR", $file, $r) {
@@ -66,7 +71,7 @@
close $fh;
}
else {
- ok t_cmp('No such file or directory',
+ ok t_cmp($errno_string,
"$!",
"expected failure");
}