aboutsummaryrefslogtreecommitdiff
path: root/tests/date.test
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-07-04 22:25:52 -0500
committerRob Landley <rob@landley.net>2016-07-04 22:25:52 -0500
commitfd78cb48e9ac3913c451599b2a86330dcd8e3167 (patch)
treef2e0f9dcdfdd83819d45fa827ac1e8a52c7caea3 /tests/date.test
parent0ed17f12764268006c945f49fe3103952b20a0fa (diff)
downloadtoybox-fd78cb48e9ac3913c451599b2a86330dcd8e3167.tar.gz
Fix chattr and date tests.
Diffstat (limited to 'tests/date.test')
-rw-r--r--tests/date.test8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/date.test b/tests/date.test
index 1d77faa5..213174ee 100644
--- a/tests/date.test
+++ b/tests/date.test
@@ -19,8 +19,8 @@ testing "-d 1110143115.30" "TZ=UTC date -d 1110143115.30 2>&1" "Sun Nov 10 14:31
testing "-d 111014312015.30" "TZ=UTC date -d 111014312015.30 2>&1" "Sun Nov 10 14:31:30 UTC 2015\n" "" ""
# Accidentally given a Unix time, we should trivially reject that.
-testing "Unix time missing @" "TZ=UTC date 1438053157 2>&1" \
- "date: bad date '1438053157'; Wed February 38 05:31:00 UTC 2057 != Sun Mar 10 05:31:00 UTC 2058\n" "" ""
+testing "Unix time missing @" "TZ=UTC date 1438053157 2>/dev/null || echo no" \
+ "no\n" "" ""
# But some invalid dates are more subtle, like Febuary 29th in a non-leap year.
-testing "Feb 29th" "TZ=UTC date 022900001975 2>&1" \
- "date: bad date '022900001975'; Wed Feb 29 00:00:00 UTC 1975 != Sat Mar 1 00:00:00 UTC 1975\n" "" ""
+testing "Feb 29th" "TZ=UTC date 022900001975 2>/dev/null || echo no" \
+ "no\n" "" ""