date: don't hard-code 2019 in the test.

I'm not worried about hard-coding the *century* in the other test. We'll
be long dead before that's an issue, and it's easier to read this way.
This commit is contained in:
Elliott Hughes 2019-03-13 22:06:38 -07:00 committed by Rob Landley
parent 3526680910
commit 021954d842

View File

@ -16,7 +16,7 @@ testing "-d @0x123 invalid" "TZ=$tz date -d @0x123 2>/dev/null || echo expected
# All SKIP_HOST=1 because coreutils rejects POSIX format dates supplied to -d.
# These expected values are from running on the host without -d (not as root!).
SKIP_HOST=1 testing "-d MMDDhhmm" \
"TZ=$tz date -d 06021234 2>&1" "Sun Jun 2 12:34:00 CEST 2019\n" "" ""
"TZ=$tz date -d 06021234 2>&1" "Sun Jun 2 12:34:00 CEST $(date +%Y)\n" "" ""
SKIP_HOST=1 testing "-d MMDDhhmmYY.SS" \
"TZ=$tz date -d 1110143115.30 2>&1" "Tue Nov 10 14:31:30 CET 2015\n" "" ""
# busybox thinks this is the year 603 (ISO time 0602-12-34 19:82 with out of range fields normalized).