From: Pádraig Brady
Date: Fri, 17 Apr 2026 12:17:56 +0000 (+0100) Subject: tests: fix false failure with dash X-Git-Tag: v9.11~5 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=15211db43f587c5fd05616b53a8e517fd4b3877d;p=thirdparty%2Fcoreutils.git tests: fix false failure with dash * tests/date/date-locale-hour.sh: Just strip the char before the last x, assuming it's going to be the newline output by `locale`. dash doesn't support $'' within ${}. --- diff --git a/tests/date/date-locale-hour.sh b/tests/date/date-locale-hour.sh index a368fb77d7..749123d853 100755 --- a/tests/date/date-locale-hour.sh +++ b/tests/date/date-locale-hour.sh @@ -60,7 +60,7 @@ done # and that it uses it by default when no format string is given. for loc in $(locale -a | shuf -n 10); do fmt="$(LC_ALL=$loc locale date_fmt; printf x)" - fmt=${fmt%$'\n'x} # Retain fmt newlines (seen with Serbian on Centos 7) + fmt=${fmt%?x} # Retain fmt newlines (seen with Serbian on Centos 7) if test -n "$fmt"; then LC_ALL=$loc date -d '2025-10-11T13:00' +"$fmt" > $loc.exp || fail=1 LC_ALL=$loc date -d '2025-10-11T13:00' > $loc.out || fail=1