summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-02-19 03:23:16 +0000
committerJim Meyering <jim@meyering.net>1997-02-19 03:23:16 +0000
commit11332e0c26e30519882ca3321887d3ce7a39d215 (patch)
tree34c3ea689990758f99f2a124448700fa40b19253 /tests
parent785168be90c0c62a50153bb1f3915cec1ba37620 (diff)
downloadcoreutils-11332e0c26e30519882ca3321887d3ce7a39d215.tar.xz
Add tests for %U, %V, and %W and for a bug fixed on 1996-03-05.
Remove misleading `-' from leap-1 test.
Diffstat (limited to 'tests')
-rw-r--r--tests/date/Test.pm24
1 files changed, 21 insertions, 3 deletions
diff --git a/tests/date/Test.pm b/tests/date/Test.pm
index bfd972e1a..faacee958 100644
--- a/tests/date/Test.pm
+++ b/tests/date/Test.pm
@@ -6,7 +6,7 @@ use strict;
# For each test...
# Export LANG=C so that the locale-dependent strings match.
# Export TZ=UTC so that zone-dependent strings match.
-$Test::default_env = ['LANG=C TZ=UTC'];
+$Test::env_default = ['LANG=C TZ=UTC'];
sub test_vector
{
@@ -26,7 +26,25 @@ sub test_vector
['8', "-d '$d1' +'%x_%X_%y_%Y'", {}, '01/19/97_08:17:48_97_1997', 0],
['9', "-d '$d1' +'%z_%Z'", {}, '+0000_GMT', 0],
- ['leap-1', "--date '02/29/1996 - 1 year' +%Y-%m-%d", {}, '1997-03-01', 0],
+ ['leap-1', "--date '02/29/1996 1 year' +%Y-%m-%d", {}, '1997-03-01', 0],
+
+ ['U95-1', "--date '1995-1-1' +%U", {}, '01', 0],
+ ['U95-2', "--date '1995-1-7' +%U", {}, '01', 0],
+ ['U95-3', "--date '1995-1-8' +%U", {}, '02', 0],
+
+ ['U92-1', "--date '1992-1-1' +%U", {}, '00', 0],
+ ['U92-2', "--date '1992-1-4' +%U", {}, '00', 0],
+ ['U92-3', "--date '1992-1-5' +%U", {}, '01', 0],
+
+ ['V92-1', "--date '1992-1-1' +%V", {}, '01', 0],
+ ['V92-2', "--date '1992-1-5' +%V", {}, '01', 0],
+ ['V92-3', "--date '1992-1-6' +%V", {}, '02', 0],
+
+ ['W92-1', "--date '1992-1-1' +%W", {}, '00', 0],
+ ['W92-2', "--date '1992-1-5' +%W", {}, '00', 0],
+ ['W92-3', "--date '1992-1-6' +%W", {}, '01', 0],
+
+ ['millen-1', "--date '1998-1-1 3 years' +%Y", {}, '2001', 0],
# FIXME: add a lot more...
);
@@ -41,7 +59,7 @@ sub test_vector
}
# Verify that the test-script generation code properly handles
# per-test overrides.
- $Test::env{2} = ['LANG=C TZ=GMT'];
+ $Test::env{9} = ['LANG=C TZ=GMT'];
return @tv;
}