]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Set LC_ALL to `C' to avoid failure when the
authorJim Meyering <jim@meyering.net>
Mon, 15 May 2000 07:18:38 +0000 (07:18 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 15 May 2000 07:18:38 +0000 (07:18 +0000)
current locale is not C (POSIX).  From Matthew Clarke.

tests/ls/time-1

index d5237587997abd4443c66a85c3c0bda5ce773ed2..294f59f1b00214fa562aa0714647860f459e1c1e 100755 (executable)
@@ -43,6 +43,13 @@ sleep 2
 # Create a link, updating c's ctime.
 ln c d || framework_failure=1
 
+# Date output in ls -l is locale-sensitive, so this test fails if the
+# current locale produces a date that doesn't match the embedded value
+# here (Jan 15 23:00:00 1998), which is in the C (POSIX) locale.  Some
+# systems don't handle LC_ALL at all, so we only force it to C if it is
+# already set.
+test ${LC_ALL+set} = set && LC_ALL=C
+
 # Before we go any further, verify that touch's -m option works.
 set -- `ls --full -l a`
 case "$*" in