bug-coreutils
[Top][All Lists]
Advanced

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

Re: same-file patch when 'ls' doesn't default to POSIX locale


From: Jim Meyering
Subject: Re: same-file patch when 'ls' doesn't default to POSIX locale
Date: Sun, 11 Jun 2006 10:16:02 +0200

Paul Eggert <address@hidden> wrote:
> On second thought, that patch is so obviously needed that I installed
> it on the trunk.  Here it is again.  Not sure whether it should be on
> the b5.9x branch at this point.
>
> 2006-06-11  Paul Eggert  <address@hidden>
>
>       * tests/cp/same-file: Execute 'ls' in the C locale, so that it
>       uses POSIX time stamp formats.  Problem reported by John Nixon in
>       <http://lists.gnu.org/archive/html/bug-coreutils/2006-06/msg00062.html>.

Thanks for looking into that, but the problem persists
if e.g., TIME_STYLE=long-iso is set in the environment.
I've done this instead:

2006-06-11  Jim Meyering  <address@hidden>

        Setting TIME_STYLE=long-iso in the environment would make the
        cp/same-file test fail.
        * tests/envvar-check (vars): Add TIME_STYLE to the list.
        * tests/cp/same-file: Revert last change.
        Source the envvar-check script, to ensure that TIME_STYLE
        settings don't affect these tests.

Index: tests/envvar-check
===================================================================
RCS file: /fetish/cu/tests/envvar-check,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -u -r1.5 -r1.6
--- tests/envvar-check  24 Mar 2004 17:40:29 -0000      1.5
+++ tests/envvar-check  11 Jun 2006 08:12:37 -0000      1.6
@@ -13,6 +13,7 @@ vars='
   DU_BLOCK_SIZE
   LS_BLOCK_SIZE
   SIMPLE_BACKUP_SUFFIX
+  TIME_STYLE
   VERSION_CONTROL
 '
 for var in $vars
Index: tests/cp/same-file
===================================================================
RCS file: /fetish/cu/tests/cp/same-file,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -u -r1.40 -r1.41
--- tests/cp/same-file  11 Jun 2006 07:59:17 -0000      1.40
+++ tests/cp/same-file  11 Jun 2006 08:12:37 -0000      1.41
@@ -8,6 +8,7 @@ if test "$VERBOSE" = yes; then
 fi
 
 . $srcdir/../lang-default
+. $srcdir/../envvar-check
 
 # Unset CDPATH.  Otherwise, output from the `cd dir' command
 # can make this test fail.
@@ -74,7 +75,7 @@ for args in 'foo symlink' 'symlink foo' 
        # and put brackets around the output.
        test -s _err && echo "[`sed 's/^[^:][^:]*:/cp:/' _err`]"
        # Strip off all but the file names.
-       ls="`LC_ALL=C ls -gG --ignore=_err . \
+       ls="`ls -gG --ignore=_err . \
            | sed \
                -e '/^total /d' \
                -e 's/^[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *[^ ]*  *//'`"




reply via email to

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