On Tue, Dec 23, 2025, 23:21 Collin Funk <[email protected]> wrote:
>
> +# 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

When looping over locales in the tests above, the control variable is
named `loc`. Should they use the same name?

> +  export LC_ALL=$locale

I'm not sure it's great to leave an arbitrary LC_ALL set for commands
other than those being tested. It probably won't hurt the `compare`
used here, but any tests added after this one could end up parsed and
executed in, e.g., zh_TW.big5, which might be surprising.

Maybe, as in the preceding tests, use `LC_ALL=$loc [date | locale]
...` instead below?

> +  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

Reply via email to