summaryrefslogtreecommitdiff
path: root/tests/misc/date
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-09-13 22:09:03 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-09-13 22:09:03 +0000
commit7cc7ac0574fb2cdf139d4e1dcfa52b971ea59df9 (patch)
tree1fbcea2d42d46b0515d81cf4e84a295528738918 /tests/misc/date
parent2c29ba03acebe73681b1eee3227d48723bee2a6b (diff)
downloadcoreutils-7cc7ac0574fb2cdf139d4e1dcfa52b971ea59df9.tar.xz
Add tests for --rfc-3339.
Diffstat (limited to 'tests/misc/date')
-rwxr-xr-xtests/misc/date10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/misc/date b/tests/misc/date
index cac4b4819..3bdcdf45f 100755
--- a/tests/misc/date
+++ b/tests/misc/date
@@ -166,19 +166,29 @@ my @Tests =
# Ensure that we can parse MONTHNAME-DAY-YEAR.
['moname-d-y', '--iso -d May-23-2003', {OUT=>"2003-05-23"}],
+ ['moname-d-y-r', '--rfc-3339=date -d May-23-2003', {OUT=>"2003-05-23"}],
['epoch', '--iso=sec -d @31536000',
{OUT=>"1971-01-01T00:00:00+0000"}],
+ ['epoch-r', '--rfc-3339=sec -d @31536000',
+ {OUT=>"1971-01-01 00:00:00+00:00"}],
['ns-10', '--iso=ns', '-d "1969-12-31 13:00:00.00000001-1100"',
{OUT=>"1970-01-01T00:00:00,000000010+0000"}],
+ ['ns-10-r', '--rfc-3339=ns', '-d "1969-12-31 13:00:00.00000001-1100"',
+ {OUT=>"1970-01-01 00:00:00.000000010+00:00"}],
['ns-max32', '--iso=ns', '-d "2038-01-19 03:14:07.999999999"',
{OUT=>"2038-01-19T03:14:07,999999999+0000"}],
+ ['ns-max32-r', '--rfc-3339=ns', '-d "2038-01-19 03:14:07.999999999"',
+ {OUT=>"2038-01-19 03:14:07.999999999+00:00"}],
['ns-relative',
'--iso=ns', "-d'1970-01-01 00:00:00.1234567 UTC +961062237.987654321 sec'",
{OUT=>"2000-06-15T09:43:58,111111021+0000"}],
+ ['ns-relativer', '--rfc-3339=ns',
+ "-d'1970-01-01 00:00:00.1234567 UTC +961062237.987654321 sec'",
+ {OUT=>"2000-06-15 09:43:58.111111021+00:00"}],
# Since coreutils/lib/getdate.y revision 1.96 (post-coreutils-5.3.0),
# a command like the following would mistakenly exit nonzero with an