diff options
author | Rob Landley <rob@landley.net> | 2021-05-28 06:17:12 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2021-05-28 06:17:12 -0500 |
commit | 54788b5670b1914061763b60a91d0842983ab428 (patch) | |
tree | eeaea1f0bafba5ef0fd737eb03c8373ccb6b17e8 /tests | |
parent | e3062c3bd3666d4641481dbf436c72e3d46ab727 (diff) | |
download | toybox-54788b5670b1914061763b60a91d0842983ab428.tar.gz |
Teach xparsedate() to handle more whitespace.
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)"' \ |