[Toybox] date test failures

Andy Chu andychup at gmail.com
Sat Mar 19 00:44:31 PDT 2016


On the master branch, I'm getting these failures.  The difference is
"Wed" vs "Sat" in the error message.

Elliot, it looks like you added these tests -- are you getting the
same failures?

Is it a libc thing?  (I'm on Ubuntu 14.04 but I tried on an older
machine too and the failure is the same.)

I don't really understand what it's trying to tell me though... FYI
GNU coreutils gives:

$ date 1438053157
date: invalid date ‘1438053157’


$ make VERBOSE=1 test_date
...
PASS: date -d 111014312015.30

FAIL: date Unix time missing @
echo -ne '' | TZ=UTC date 1438053157 2>&1
--- expected    2016-03-19 00:40:21.056862385 -0700
+++ actual      2016-03-19 00:40:21.056862385 -0700
@@ -1 +1 @@
-date: bad date '1438053157'; Wed February 38 05:31:00 UTC 2057 != Sun
Mar 10 05:31:00 UTC 2058
+date: bad date '1438053157'; Sat February 38 05:31:00 UTC 2057 != Sun
Mar 10 05:31:00 UTC 2058

FAIL: date Feb 29th
echo -ne '' | TZ=UTC date 022900001975 2>&1
--- expected    2016-03-19 00:40:21.056862385 -0700
+++ actual      2016-03-19 00:40:21.060862385 -0700
@@ -1 +1 @@
-date: bad date '022900001975'; Wed Feb 29 00:00:00 UTC 1975 != Sat
Mar  1 00:00:00 UTC 1975
+date: bad date '022900001975'; Sat Feb 29 00:00:00 UTC 1975 != Sat
Mar  1 00:00:00 UTC 1975
make: *** [test_date] Error 1


Andy


More information about the Toybox mailing list