From: Pádraig Brady Date: Mon, 9 Mar 2026 21:01:27 +0000 (+0000) Subject: tests: expand: fix false failure on various systems X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4cf72f5a798edcbe9502a53e6e9a042d9a1163d;p=thirdparty%2Fcoreutils.git tests: expand: fix false failure on various systems * tests/expand/mb.sh: Use $LOCALE_FR_UTF8 rather than hardcoding "en_US.UTF-8". * tests/unexpand/mb.sh: Likewise. Reported by Bruno Haible. --- diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh index 10ea160f49..a869e74c7d 100755 --- a/tests/expand/mb.sh +++ b/tests/expand/mb.sh @@ -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_ diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh index dde30b5941..76a2679035 100755 --- a/tests/unexpand/mb.sh +++ b/tests/unexpand/mb.sh @@ -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