From: Pádraig Brady Date: Mon, 16 Mar 2026 22:25:42 +0000 (+0000) Subject: tests: ls: fix false failure on FreeBSD X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c1346460d1f45fc8012cf53297870aff95db61ee;p=thirdparty%2Fcoreutils.git tests: ls: fix false failure on FreeBSD * tests/ls/non-utf8-hidden.sh: Avoid sorting in ls, to avoid: ls: cannot compare file names ...: Illegal byte sequence seen on FreeBSD 14. Reported by Bruno Haible. --- diff --git a/tests/ls/non-utf8-hidden.sh b/tests/ls/non-utf8-hidden.sh index e825af6321..06dc4084a2 100755 --- a/tests/ls/non-utf8-hidden.sh +++ b/tests/ls/non-utf8-hidden.sh @@ -35,13 +35,13 @@ for loc in C "$LOCALE_FR" "$LOCALE_FR_UTF8"; do export LC_ALL="$loc" # Test 1: Without -a flag, only visible file should appear - ls d > out1 || fail=1 + ls -U d > out1 || fail=1 echo 'visible' > exp1 compare exp1 out1 || fail=1 # Test 2: With -a flag, all files including hidden ones should appear # The invalid UTF-8 filename will be shown in some escaped form - ls -a d > out2 || fail=1 + ls -a -U d > out2 || fail=1 # Check that we have at least 5 entries (., .., visible, and 2 hidden files) line_count=$(wc -l < out2)