diff options
| author | Pádraig Brady <P@draigBrady.com> | 2025-09-22 00:18:28 +0100 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2025-09-22 11:23:50 +0100 |
| commit | b8b486dc32f26743a8971104992ca8fe2a4c4e5c (patch) | |
| tree | e56c85957d76b8dc6b65833174a384953011abbd | |
| parent | tests: du: avoid false failure in racy test (diff) | |
| download | coreutils-b8b486dc32f26743a8971104992ca8fe2a4c4e5c.tar.gz coreutils-b8b486dc32f26743a8971104992ca8fe2a4c4e5c.zip | |
tests: ls: avoid alignment check with non printable characters
* tests/ls/block-size.sh: Skip the case where there are
non-printable characters in ls' output, which is the case
with NBSP thousands separators on FreeBSD 11 and 12.
We may drop the MBSW_REJECT_UNPRINTABLE in future from
ls and numfmt, but for now avoid these characters in the test.
Reported by Bruno Haible.
| -rwxr-xr-x | tests/ls/block-size.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ls/block-size.sh b/tests/ls/block-size.sh index 501c7f82b..d3111c279 100755 --- a/tests/ls/block-size.sh +++ b/tests/ls/block-size.sh @@ -193,6 +193,12 @@ done # If any of these unavailable, the C fallback should also be aligned for loc in sv_SE.UTF-8 $LOCALE_FR_UTF8; do + + # Ensure we have a printable thousands separator + # This is not the case on FreeBSD 11/12 at least with NBSP + test $(LC_ALL=$loc ls -s1 --block-size=\'k file1M | + cut -dK -f1 | LC_ALL=$loc wc -L) = 5 || continue + test $(LC_ALL=$loc ls -s1 --block-size=\'k | tail -n+2 | cut -dK -f1 | while IFS= read size; do |
