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/stat.t fails under Czech locale #12154
Comments
From @CorionHello Porters, http://perlmonks.org/?node=973257 contains a bugreport and bugfix by The (tested?) fix invokes `tail +2`. Is that sane to assume for the tests? The alternative would be to munge the results in Perl, removing the top total 666 as its first line. I've attached the patch below [1] (instead of $ENV{LC_ALL} = 'C'; I can't test either, as I cannot replicate the environment. If this patch goes in, I also nominate it for backporting into 5.16.1 , -max [1] 0001-Don-t-test-first-line-of-ls-l-output.patch |
From @Corion0001-Don-t-test-first-line-of-ls-l-output.patchFrom 0971c5c440700440cf1f5a0a02e730046e9325ba Mon Sep 17 00:00:00 2001
From: Max Maischein <corion@corion.net>
Date: Sun, 3 Jun 2012 12:06:11 +0200
Subject: [PATCH] Don't test first line of `ls -l` output
This fixes t/op/stat.t failing under Czech locale due to misparsing
celkem 0
as a character device.
Reported by mrthom via http://perlmonks.org/?node=973257
---
t/op/stat.t | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/t/op/stat.t b/t/op/stat.t
index af1fa5e..94cad29 100644
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -250,7 +250,7 @@ SKIP: {
if $Is_VMS;
my $LS = $Config{d_readlink} ? "ls -lL" : "ls -l";
- my $CMD = "$LS /dev 2>/dev/null";
+ my $CMD = "$LS /dev 2>/dev/null | tail -n +2";
my $DEV = qx($CMD);
skip "$CMD failed", 6 if $DEV eq '';
--
1.6.5.1.1367.gcd48
|
From @Corion0001-Force-external-tools-to-speak-English.patchFrom 89589d5e8909f9321a44c28484cfef518e7c22a7 Mon Sep 17 00:00:00 2001
From: Max Maischein <corion@corion.net>
Date: Sun, 3 Jun 2012 12:28:03 +0200
Subject: [PATCH] Force external tools to speak English
This fixes the build issue on a Czech locale reported in http://perlmonks.org/?node=973257
by trying to convince external tools to speak English.
---
t/op/stat.t | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/t/op/stat.t b/t/op/stat.t
index af1fa5e..3b7a906 100644
--- a/t/op/stat.t
+++ b/t/op/stat.t
@@ -1,6 +1,8 @@
#!./perl
BEGIN {
+ $ENV{LC_ALL} = "C"; # so that external utilities speak English
+ $ENV{LANGUAGE} = 'C'; # GNU locale extension
chdir 't' if -d 't';
@INC = '../lib';
require './test.pl'; # for which_perl() etc
--
1.6.5.1.1367.gcd48
|
From @nwc10On Sun, Jun 03, 2012 at 03:30:16AM -0700, Max Maischein wrote:
It seems so, in that it worked on both the AIX and HP-UX machines I have
I think it would be better to clean out the environment. It seems less Frustratingly, it seems that I can't test this *either*, as both the Personally, I wouldn't put it in the BEGIN block, although I see that
Nicholas Clark |
The RT System itself - Status changed from 'new' to 'open' |
From @TuxOn Sun, 3 Jun 2012 20:49:33 +0100, Nicholas Clark <nick@ccl4.org> wrote:
Also works on HP-UX 10.20
-- |
From @dmcbrideOn Sunday June 3 2012 9:59:53 PM H.Merijn Brand wrote:
I recall having to move from "tail <num>" to "tail -n <num>" a number of years |
From @nwc10On Sun Jun 03 12:50:09 2012, nicholas wrote:
I now have access to a machine with Wheezy, and can replicate it. Nicholas Clark |
@nwc10 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#113472 (status was 'resolved')
Searchable as RT113472$
The text was updated successfully, but these errors were encountered: