diff options
author | Jim Meyering <meyering@redhat.com> | 2011-06-17 20:30:10 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-06-18 08:34:07 +0200 |
commit | 4c3c2c795ee7453add2c6e9b3112486be086a784 (patch) | |
tree | ad9192ffb80fba8d75fa62f884a05617ba8a7a24 | |
parent | f0e8f13ead3dafce2b776d4ee11321d737216ff4 (diff) | |
download | coreutils-4c3c2c795ee7453add2c6e9b3112486be086a784.tar.xz |
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.
-rw-r--r-- | THANKS.in | 1 | ||||
-rwxr-xr-x | tests/misc/sort-debug-keys | 11 |
2 files changed, 9 insertions, 3 deletions
@@ -525,6 +525,7 @@ Solar Designer solar@owl.openwall.com Stanislav Ievlev inger@altlinux.ru Stavros Passas stabat@ics.forth.gr Stefan Vargyas stvar@yahoo.com +Stefano Lattarini stefano.lattarini@gmail.com Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr Stephen Depooter sbdep@myrealbox.com Stephen Eglen eglen@pcg.wustl.edu diff --git a/tests/misc/sort-debug-keys b/tests/misc/sort-debug-keys index 238c33e23..b4c2fb74e 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 |