Source lang-default rather than open-coding
authorJim Meyering <jim@meyering.net>
Sun, 22 Oct 2000 13:09:28 +0000 (13:09 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 22 Oct 2000 13:09:28 +0000 (13:09 +0000)
the setting/exporting of LANG, LC_ALL, and LANGUAGE.

20 files changed:
tests/cp/backup-is-src
tests/cp/cp-mv-backup
tests/cp/same-file
tests/cp/slink-2-slink
tests/cp/symlink-slash
tests/ln/sf-1
tests/ls/symlink-slash
tests/ls/time-1
tests/mv/backup-is-src
tests/mv/diag
tests/mv/force
tests/mv/hard-link-1
tests/mv/i-2
tests/mv/into-self
tests/mv/into-self-2
tests/mv/into-self-3
tests/mv/mv-special-1
tests/mv/part-symlink
tests/mv/partition-perm
tests/rm/r-2

index e753e4a..07741dd 100755 (executable)
@@ -16,12 +16,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # This cp command should exit nonzero.
 cp --b=simple a~ a > out 2>&1 && fail=1
index fbed6f0..1baadc6 100755 (executable)
@@ -6,11 +6,8 @@ if test "$VERBOSE" = yes; then
   cp --version
 fi
 
-LANGUAGE=C; export LANGUAGE
-LANG=C; export LANG
-
 # Ensure that ls sorts the same way for everyone.
-LC_ALL=C; export LC_ALL
+. $srcdir/../lang-default
 
 . $srcdir/../envvar-check
 
index 6752b4f..7ae7ec0 100755 (executable)
@@ -7,8 +7,7 @@ if test "$VERBOSE" = yes; then
   cp --version
 fi
 
-LANGUAGE=C; export LANGUAGE
-LANG=C; export LANG
+. $srcdir/../lang-default
 
 VERSION_CONTROL=numbered; export VERSION_CONTROL
 
index 2c9fd41..90a3f6f 100755 (executable)
@@ -10,12 +10,7 @@ fi
 . $srcdir/../envvar-check
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 pwd=`pwd`
 tmp=sl2sl-$$
index 9370a2b..7fb0c07 100755 (executable)
@@ -7,6 +7,8 @@ if test "$VERBOSE" = yes; then
   cp --version
 fi
 
+. $srcdir/../lang-default
+
 tmp=t-cpsymsl.$$
 
 framework_failure=0
@@ -23,7 +25,7 @@ fi
 
 fail=0
 cp -dR symlink/ s || fail=1
-set `LANGUAGE=C LC_ALL=C ls -l s`
+set `ls -l s`
 
 # Prior to fileutils-4.0q, the following would have output ...`s -> dir'
 # because the trailing slash was removed unconditionally (now you have to
index 894144a..4247116 100755 (executable)
@@ -21,12 +21,7 @@ if test $test_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 fail=0
 ln -sf a b > err 2>&1 && fail=1
index ae12b09..e365f85 100755 (executable)
@@ -20,8 +20,7 @@ if test $framework_failure = 1; then
   exit 1
 fi
 
-LANGUAGE=C; export LANGUAGE
-LANG=C; export LANG
+. $srcdir/../lang-default
 
 fail=0
 set `ls -l symlink/`
index c81fcae..ba251d7 100755 (executable)
@@ -46,8 +46,7 @@ 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.
-LC_ALL=C
-export LC_ALL
+. $srcdir/../lang-default
 
 # Before we go any further, verify that touch's -m option works.
 set -- `ls --full -l a`
index 90c0bf3..7f1e623 100755 (executable)
@@ -26,12 +26,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # This mv command should exit nonzero.
 mv --b=simple $a2 $a > out 2>&1 && fail=1
index 83714ff..c3fc1b0 100755 (executable)
@@ -25,12 +25,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # These mv commands should all exit nonzero.
 
index 1455ef3..9a101e4 100755 (executable)
@@ -20,12 +20,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # This mv command should exit nonzero.
 mv $ff $ff > out 2>&1 && fail=1
index 2f4b792..3b077ea 100755 (executable)
@@ -26,12 +26,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 mv $dir $other_partition_tmpdir || fail=1
 
index 2d4cbee..72f26ed 100755 (executable)
@@ -11,12 +11,7 @@ fi
 . $srcdir/../envvar-check
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 pwd=`pwd`
 tmp=cp-mv-if-$$
index fe48b4f..089d160 100755 (executable)
@@ -23,12 +23,7 @@ fi
 fail=0
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # This mv command should fail.
 mv $dir $file $dir > out 2>&1 && fail=1
index 81e151a..7c8a340 100755 (executable)
@@ -34,12 +34,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # This mv command should exit nonzero.
 mv $symlink $file > out 2>&1 && fail=1
index 94de9c8..8641468 100755 (executable)
@@ -19,12 +19,7 @@ if test $framework_failure = 1; then
 fi
 
 # Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
+. $srcdir/../lang-default
 
 # This mv command should exit nonzero.
 mv $dir1 $dir2 $dir2 > out 2>&1 && fail=1
index 39df45e..412e1e6 100755 (executable)
@@ -1,6 +1,8 @@
 #! /bin/sh
 
 . $srcdir/setup
+# Make sure we get English translations.
+. $srcdir/../lang-default
 
 if test -z "$other_partition_tmpdir"; then
   exit 77
@@ -26,14 +28,6 @@ if test $framework_failure = 1; then
   exit 77
 fi
 
-# Make sure we get English translations.
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
-LANG=C
-export LANG
-
 fail=0
 mv --verbose $null $dir $other_partition_tmpdir > out || fail=1
 # Make sure the files are gone.
index 254159b..f2514c2 100755 (executable)
@@ -17,11 +17,8 @@ pwd_tmp=$pwd/$tmp
 
 . $srcdir/setup
 . $srcdir/../envvar-check
-
 # Make sure the programs use C-locale formats/translations.
-LANGUAGE=C; export LANGUAGE
-LC_ALL=C; export LC_ALL
-LANG=C; export LANG
+. $srcdir/../lang-default
 
 if test -z "$other_partition_tmpdir"; then
   (exit 77); exit
index 08eb69b..3b87676 100755 (executable)
@@ -8,13 +8,14 @@ fi
 
 . $srcdir/setup
 . $srcdir/../envvar-check
+. $srcdir/../lang-default
 
 if test -z "$other_partition_tmpdir"; then
   exit 77
 fi
 
-LANGUAGE=C; export LANGUAGE
-LANG=C; export LANG
+=''; export LANGUAGE
+=''; export LANG
 
 pwd=`pwd`
 dir=p-perm-$$
index a85c61f..044dd22 100755 (executable)
@@ -18,10 +18,7 @@ mkdir t t/a t/a/b || framework_failure=1
 > t/a/f || framework_failure=1
 > t/a/b/g || framework_failure=1
 
-LANGUAGE=C
-export LANGUAGE
-LC_ALL=C
-export LC_ALL
+. $srcdir/../lang-default
 
 # FIXME: if this fails, it's a framework failure
 cat <<EOF | sort > t/E || framework_failure=1