Skip to content
Myr

Fix localization test for time formatting functions (fix #3368) (#3409)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by itchyny · committed by GitHub · parent a4d9d54 · Browse files · 1 file+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−3 removed

  • tests:+5 added−3 removed

1 file+5 added−3 removed

modified:tests/shtest+5 added-3 removed
678 unmodified lines
679EOF680 if [ -z "$l" ]; then681 echo "WARNING: Not testing localization"682 else683 date=$(LC_ALL=$l date +'%a %d %b %Y at %H:%M:%S')684 if ! LC_ALL=$l $JQ -nR --arg date "$date" '$date|strptime("%a %d %b %Y at %H:%M:%S")'; then685 echo "jq does not honor LC_ALL environment variable"683 dt1=$(LC_ALL=$l date +'%a %d %b %Y at %H:%M:%S')684 dt2=$(LC_ALL=$l jq -nr 'now | strflocaltime("%a %d %b %Y at %H:%M:%S")')685 dt3=$(LC_ALL=$l date +'%a %d %b %Y at %H:%M:%S')686 if [ "$dt1" != "$dt2" ] && [ "$dt2" != "$dt3" ]; then687 echo "jq does not honor LC_ALL environment variable ($dt1, $dt2, $dt3)"688 exit 1689 fi690 fi691fi
156 unmodified lines