diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/date.test | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/date.test b/tests/date.test index 6aaf937e..dfcefb26 100644 --- a/tests/date.test +++ b/tests/date.test @@ -76,6 +76,8 @@ testing "TZ= @" "TZ='America/Los_Angeles' date -d 'TZ=\"GMT\" @1533427200'" "Sat # Test all supported UTC offset variants. testing "tz Z" \ "date -u -d 2020-08-01T12:34:56Z" "Sat Aug 1 12:34:56 UTC 2020\n" "" "" +testing "tz ' Z '" \ + "date -u -d '2020-08-01T12:34:56 Z '" "Sat Aug 1 12:34:56 UTC 2020\n" "" "" testing "tz -0800" \ "date -u -d 2020-08-01T12:34:56-0800" "Sat Aug 1 20:34:56 UTC 2020\n" "" "" testing "tz +0800" \ @@ -88,6 +90,9 @@ testing "tz +08" \ "date -u -d 2020-08-01T12:34:56+08" "Sat Aug 1 04:34:56 UTC 2020\n" "" "" testing "tz +008" \ "date -u -d 2020-08-01T12:34:56+008" "Sat Aug 1 12:26:56 UTC 2020\n" "" "" +testing "tz + 8 : 8 " \ + "date -u -d '2020-08-01T12:34:56 + 8 : 8 '" "Sat Aug 1 04:26:56 UTC 2020\n"\ + "" "" # Can we parse date's own output format? testing "round trip" 'TZ=$tz date -d "$(TZ=$tz date -d @1598476818)"' \ |