]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid a false failure on OS X 10.5.8
authorPádraig Brady <P@draigBrady.com>
Sat, 11 Mar 2017 18:44:46 +0000 (10:44 -0800)
committerPádraig Brady <P@draigBrady.com>
Sat, 11 Mar 2017 18:48:10 +0000 (10:48 -0800)
* tests/misc/sort-debug-keys.sh: Disparate LC_CTYPE and LC_MESSAGES
are not supported, with the result LC_MESSAGES=C is used throughout.
Therefore just set LC_ALL in the test, and normalize the message
variants with sed.
Reported and tested by J Rogowsky.

tests/misc/sort-debug-keys.sh

index f90aa0f2d4078989671712feba5c4f276dc34ee4..cb03a1f1c2c195d32a0cc7a8ff9c4c99ad9134cc 100755 (executable)
@@ -324,13 +324,13 @@ 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_COLLATE=$f LC_CTYPE=$f LC_NUMERIC=$f LC_MESSAGES=C \
-        sort --debug -k2g -k1b,1
+    LC_ALL=$f sort --debug -k2g -k1b,1
   echo '+1234 1234Gi 1,234M' |
-    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
+    LC_ALL=$f sort --debug \
+        -k1,1n -k1,1g -k1,1h \
+        -k2,2n -k2,2g -k2,2h \
+        -k3,3n -k3,3g -k3,3h
+  ) | sed 's/^^ .*/^ no match for key/' > out
   compare exp out || fail=1
 fi