]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: simplify treatment of the $LOCALE_FR_UTF8 variable
authorPádraig Brady <P@draigBrady.com>
Tue, 27 Feb 2024 14:05:49 +0000 (14:05 +0000)
committerPádraig Brady <P@draigBrady.com>
Tue, 27 Feb 2024 14:27:04 +0000 (14:27 +0000)
* tests/df/problematic-chars.sh: Rely on gnulib setting
this to "none" where not usable.
* tests/misc/sleep.sh: Likewise.
* tests/printf/printf-mb.sh: Likewise.
* tests/printf/printf-quote.sh: Likewise.
* tests/sort/sort-debug-keys.sh: Likewise.

tests/df/problematic-chars.sh
tests/misc/sleep.sh
tests/printf/printf-mb.sh
tests/printf/printf-quote.sh
tests/sort/sort-debug-keys.sh

index 049128e8056e8218ffdd4a8c3befb98e0dfc4bcf..a5d5991d08f8d5d78b0cfe27ecf3c2899b2436da 100755 (executable)
@@ -46,9 +46,8 @@ test "$fail" = 1 && dump_mount_list_
 # Ensure mount points not matching the current user encoding are output
 
 unset LC_ALL
-f=$LOCALE_FR_UTF8
-: ${LOCALE_FR_UTF8=none}
 if test "$LOCALE_FR_UTF8" != "none"; then
+  f=$LOCALE_FR_UTF8
 
   cleanup_ || framework_failure_
 
index 96bd683c2aec4dfbce2955e8e483216a6c24d10a..2868c2edee0b83628e23aac1a60ce531645026d5 100755 (executable)
@@ -40,7 +40,6 @@ returns_ 124 timeout 0.1 sleep inf || fail=1
 returns_ 124 timeout 0.1 sleep $LDBL_MAX || fail=1
 
 # Test locale decimal handling for printf, sleep, timeout
-: ${LOCALE_FR_UTF8=none}
 if test "$LOCALE_FR_UTF8" != "none"; then
   f=$LOCALE_FR_UTF8
   locale_decimal=$(LC_ALL=$f env printf '%0.3f' 0.001) || fail=1
index 80451e87833b5d6717cff724ac5af7901eec9080..1e8802ff03f84b74ccf0724cfda4a07436858379 100755 (executable)
@@ -22,9 +22,8 @@ print_ver_ printf
 prog='env printf'
 
 unset LC_ALL
-f=$LOCALE_FR_UTF8
-: ${LOCALE_FR_UTF8=none}
 if test "$LOCALE_FR_UTF8" != "none"; then
+  f=$LOCALE_FR_UTF8
   (
    #valid multi-byte
    LC_ALL=$f $prog '%04x\n' '"á' >>out 2>>err
index eb718a6299413e0cb25932989f749bb41625672a..969e53655f04a6e08f3f1e18d997c0d5a8a4aa40 100755 (executable)
@@ -35,9 +35,8 @@ EOF
 compare exp out || fail=1
 
 unset LC_ALL
-f=$LOCALE_FR_UTF8
-: ${LOCALE_FR_UTF8=none}
 if test "$LOCALE_FR_UTF8" != "none"; then
+  f=$LOCALE_FR_UTF8
   (
    #printable multi-byte
    LC_ALL=$f $prog '%q\n' 'áḃç' > out
index c307da669b928a80d87838d6bf1b1d75f49aa82f..77bc2900e93ffb48401424cae597398d779a7a92 100755 (executable)
@@ -316,10 +316,8 @@ ___________________
 EOF
 
 unset LC_ALL
-f=$LOCALE_FR_UTF8
-
-: ${LOCALE_FR_UTF8=none}
 if test "$LOCALE_FR_UTF8" != "none"; then
+ f=$LOCALE_FR_UTF8
  LC_NUMERIC=$f LC_MESSAGES=C sort -g --debug /dev/null 2> debug.out
  if grep 'numbers use .*,.* as a decimal point' debug.out >/dev/null; then
   (