bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8883: 1 of 390 tests failed (misc/sort-debug-keys)


From: Jim Meyering
Subject: bug#8883: 1 of 390 tests failed (misc/sort-debug-keys)
Date: Fri, 17 Jun 2011 20:34:25 +0200

Stefano Lattarini wrote:
> From the latest git version `v8.12-87-g23ddefd', testsuite run by
> "nice -n19 make check", using various developement version of other
> tools (e.g, sed, awk, make, ...).

Thanks for the testing and the report.

That was an interesting one.
I've never seen it because I build too often with --disable-nls.
And even without --disable-nls, if you used a --prefix= pointing
to a hierarchy with no prior installation, you'd see this failure
only if you run "make install" *before* "make check".

[marking this "done" already, but I'd welcome any feedback,
 and won't push right away ;-) ]

>From 9e7ce2c871677422d42ba1616c32ac4f3b9fc002 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 17 Jun 2011 20:30:10 +0200
Subject: [PATCH] tests: sort-debug-keys: fix a bug with translated
 diagnostics

Ensure that English diagnostics are emitted even when using
French sorting rules.
* tests/misc/sort-debug-keys: Unset LC_ALL and set LC_COLLATE,
LC_CTYPE and LC_NUMERIC to the fr_FR.UTF-8 locale, while setting
LC_MESSAGES=C.  Reported by Stefano Lattarini.
---
 tests/misc/sort-debug-keys |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/tests/misc/sort-debug-keys b/tests/misc/sort-debug-keys
index 238c33e..b4c2fb7 100755
--- a/tests/misc/sort-debug-keys
+++ b/tests/misc/sort-debug-keys
@@ -308,16 +308,21 @@ _____
 ___________________
 EOF

+unset LC_ALL
+f=$LOCALE_FR_UTF8
+
 : ${LOCALE_FR_UTF8=none}
 if test "$LOCALE_FR_UTF8" != "none"; then
   (
   echo '   1²---++3   1,234  Mi' |
     LC_ALL=C sort --debug -k2g -k1b,1
   echo '   1²---++3   1,234  Mi' |
-    LC_ALL=$LOCALE_FR_UTF8 sort --debug -k2g -k1b,1
+    LC_COLLATE=$f LC_CTYPE=$f LC_NUMERIC=$f LC_MESSAGES=C \
+        sort --debug -k2g -k1b,1
   echo '+1234 1234Gi 1,234M' |
-    LC_ALL=$LOCALE_FR_UTF8 sort --debug -k1,1n -k1,1g \
-    -k1,1h -k2,2n -k2,2g -k2,2h -k3,3n -k3,3g -k3,3h
+    LC_COLLATE=$f LC_CTYPE=$f LC_NUMERIC=$f LC_MESSAGES=C \
+      sort --debug -k1,1n -k1,1g \
+        -k1,1h -k2,2n -k2,2g -k2,2h -k3,3n -k3,3g -k3,3h
   ) > out
   compare out exp || fail=1
 fi
--
1.7.6.rc0.293.g40857





reply via email to

[Prev in Thread] Current Thread [Next in Thread]