]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: expand: fix false failure on various systems
authorPádraig Brady <P@draigBrady.com>
Mon, 9 Mar 2026 21:01:27 +0000 (21:01 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 9 Mar 2026 21:08:40 +0000 (21:08 +0000)
* tests/expand/mb.sh: Use $LOCALE_FR_UTF8 rather than
hardcoding "en_US.UTF-8".
* tests/unexpand/mb.sh: Likewise.
Reported by Bruno Haible.

tests/expand/mb.sh
tests/unexpand/mb.sh

index 10ea160f495396cc69a81001311873df36ec2021..a869e74c7de348c61580efe0520ebdd72db47482 100755 (executable)
@@ -18,7 +18,8 @@
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ expand printf
 
-export LC_ALL=en_US.UTF-8
+test "$LOCALE_FR_UTF8" != none || skip_ "French UTF-8 locale not available"
+export LC_ALL="$LOCALE_FR_UTF8"
 
 #input containing multibyte characters
 cat <<\EOF > in || framework_failure_
index dde30b5941c5bc3bcda29f49887f944c85a58762..76a2679035956495c0f89b29d6aa32ed92ce7996 100755 (executable)
@@ -18,7 +18,8 @@
 . "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
 print_ver_ unexpand printf
 
-export LC_ALL=en_US.UTF-8
+test "$LOCALE_FR_UTF8" != none || skip_ "French UTF-8 locale not available"
+export LC_ALL="$LOCALE_FR_UTF8"
 
 #input containing multibyte characters
 cat > in <<\EOF
@@ -84,7 +85,7 @@ unexpand -a < in > out || fail=1
 compare exp out > /dev/null 2>&1 || fail=1
 
 #test input where a blank of width > 1 is not being substituted
-in="$(LC_ALL=en_US.UTF-8 env printf ' \u3000  ö       ü       ß')"
+in="$(env printf ' \u3000  ö       ü       ß')"
 exp='    ö       ü      ß'
 
 unexpand -a < in > out || fail=1