shtest: skip locale test if date lacks locale support (#3583)

This commit is contained in:
pavel kuliaka
2026-07-18 17:03:18 +09:00
committed by GitHub
parent 579e6f76cf
commit dbcaa9d491
+2
View File
@@ -711,6 +711,8 @@ $locales
EOF
if [ -z "$l" ]; then
echo "WARNING: Not testing localization"
elif [ "$(LC_ALL=C date +%a%b)" = "$(LC_ALL=$l date +%a%b)" ]; then
echo "WARNING: Date does not produce locale-dependent output for $l, skipping localization test"
else
dt1=$(LC_ALL=$l date +'%a %d %b %Y at %H:%M:%S')
dt2=$(LC_ALL=$l $JQ -nr 'now | strflocaltime("%a %d %b %Y at %H:%M:%S")')