* tests/date/date-locale-hour.sh: Test that the default format of all supported locales is the same as 'locale date_fmt'. --- tests/date/date-locale-hour.sh | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/tests/date/date-locale-hour.sh b/tests/date/date-locale-hour.sh index 409091080..205e8afa3 100755 --- a/tests/date/date-locale-hour.sh +++ b/tests/date/date-locale-hour.sh @@ -56,5 +56,13 @@ for loc in "$LOCALE_FR_UTF8" 'en_US.UTF-8'; do esac done +# Make sure 'date' can use the format string given by 'locale date_fmt' +# and that it uses it by default when no format string is given. +for locale in $(locale -a); do + export LC_ALL=$locale + date -d '2025-10-11T13:00' +"$(locale date_fmt)" > $locale.exp || fail=1 + date -d '2025-10-11T13:00' > $locale.out || fail=1 + compare $locale.exp $locale.out || fail=1 +done Exit $fail -- 2.52.0
