New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
t/op/mkdir.t fails, setting LC_ALL=C does not work #10134
Comments
From eserte@biokovo.herceg.deThis is a bug report for perl from eserte@biokovo.herceg.de, With non-English locale setting the op/mkdir.t test fails with $ locale $ ./perl -Ilib t/op/mkdir.t The test tries to force using an English message catalog by setting the On Linux systems (tested with CentOS4 and Debian/lenny and standard perls): $ locale On FreeBSD 8.0: $ locale (Solaris 10 and Mac OS X 10.3 have no localized messages catalogs What works is setting the locale with POSIX::setlocale(). See the But maybe it would be nice if the LC environment variable family Regards, From 41c2fb854944a52e211d72d0011d5a45d57ef023 Mon Sep 17 00:00:00 2001 t/op/mkdir.t | 3 +++ diff --git a/t/op/mkdir.t b/t/op/mkdir.t ok(mkdir('blurfl',0777)); Flags: Site configuration information for perl 5.11.4: Configured by eserte at Sat Feb 6 21:16:53 CET 2010. Summary of my perl5 (revision 5 version 11 subversion 4) configuration: Locally applied patches: @INC for perl 5.11.4: Environment for perl 5.11.4: |
From @rgarciaOn 6 February 2010 22:23, eserte@biokovo.herceg.de
For extra portability I think we could use %! instead of $!.
I think it would be too much, yes.
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @eserteRafael Garcia-Suarez <rgs@consttype.org> writes:
I see. Maybe the following patch would be better? Can we rely that |
From @eserte0001-do-not-rely-on-stringified-in-mkdir.t-test.patchFrom fefed73a5eb3e5ab442b8bf0ca1cdac0fa00e6c0 Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sun, 7 Feb 2010 14:33:08 +0100
Subject: [PATCH] do not rely on stringified $! in mkdir.t test
---
t/op/mkdir.t | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/op/mkdir.t b/t/op/mkdir.t
index bd0d1b4..0ad5dac 100644
--- a/t/op/mkdir.t
+++ b/t/op/mkdir.t
@@ -17,11 +17,11 @@ $ENV{LANGUAGE} = 'C'; # GNU locale extension
ok(mkdir('blurfl',0777));
ok(!mkdir('blurfl',0777));
-like($!, qr/cannot move|exist|denied|unknown/i);
+ok($!{EEXIST} || $! =~ /cannot move|exist|denied|unknown/i);
ok(-d 'blurfl');
ok(rmdir('blurfl'));
ok(!rmdir('blurfl'));
-like($!, qr/cannot find|such|exist|not found|not a directory|unknown/i);
+ok($!{ENOENT} || $! =~ /cannot find|such|exist|not found|not a directory|unknown/i);
ok(mkdir('blurfl'));
ok(rmdir('blurfl'));
--
1.6.4.3
|
From @eserte-- tktimex - time recording tool |
From @eserteThe following issue is still not resolved in 5.12.0-RC0: Slaven Rezic <slaven@rezic.de> writes:
-- tktimex - time recording tool |
From @obraOn Mon, Mar 29, 2010 at 10:45:42AM +0200, Slaven Rezic wrote:
Let's look at this for 5.12.1. |
From @eserteJesse Vincent <jesse@fsck.com> writes:
So time to do this now? Here's my proposed patch again: From fefed73a5eb3e5ab442b8bf0ca1cdac0fa00e6c0 Mon Sep 17 00:00:00 2001 t/op/mkdir.t | 4 ++-- Inline Patchdiff --git a/t/op/mkdir.t b/t/op/mkdir.t
index bd0d1b4..0ad5dac 100644
--- a/t/op/mkdir.t
+++ b/t/op/mkdir.t
@@ -17,11 +17,11 @@ $ENV{LANGUAGE} = 'C'; # GNU locale extension
ok(mkdir('blurfl',0777));
ok(!mkdir('blurfl',0777));
-like($!, qr/cannot move|exist|denied|unknown/i);
+ok($!{EEXIST} || $! =~ /cannot move|exist|denied|unknown/i);
ok(-d 'blurfl');
ok(rmdir('blurfl'));
ok(!rmdir('blurfl'));
-like($!, qr/cannot find|such|exist|not found|not a directory|unknown/i);
+ok($!{ENOENT} || $! =~ /cannot find|such|exist|not found|not a directory|unknown/i);
ok(mkdir('blurfl'));
ok(rmdir('blurfl'));
--
-- Berlin Perl Mongers - http://berlin.pm.org |
From @smpetersOn Thu May 06 13:54:22 2010, slaven@rezic.de wrote:
Thanks! I've committed this patch as change a9e1ff3. Steve |
@smpeters - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#72588 (status was 'resolved')
Searchable as RT72588$
The text was updated successfully, but these errors were encountered: