summaryrefslogtreecommitdiff
path: root/tests/date
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1999-12-23 09:50:31 +0000
committerJim Meyering <jim@meyering.net>1999-12-23 09:50:31 +0000
commitd134d00bb49782bcd95c4be709e19ffd61a697d1 (patch)
tree41de9ad447ee79cb1fed787631f7b7a2017b04ed /tests/date
parent9cd6962a4ab1ae26494643f9c07089dbd0baccd8 (diff)
downloadcoreutils-d134d00bb49782bcd95c4be709e19ffd61a697d1.tar.xz
.
Diffstat (limited to 'tests/date')
-rw-r--r--tests/date/Makefile.am4
-rw-r--r--tests/date/Makefile.in4
-rwxr-xr-xtests/date/date-tests19
3 files changed, 22 insertions, 5 deletions
diff --git a/tests/date/Makefile.am b/tests/date/Makefile.am
index 764a56692..e2f3c5640 100644
--- a/tests/date/Makefile.am
+++ b/tests/date/Makefile.am
@@ -9,7 +9,7 @@ W92-3.X millen-1.X rel-0.X rel-1a.X rel-1b.X rel-2a.X rel-2b.X rel-2c.X \
rel-2d.X rel-2e.X rel-2f.X rel-2g.X rel-3a.X next-s.X next-m.X next-h.X \
next-d.X next-w.X next-mo.X next-y.X utc-0.X utc-0a.X utc-1.I utc-1.X \
utc-1a.I utc-1a.X date2sec-0.X date2sec-0a.X date2sec-1.X sec2date-0.X \
-this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X
+this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X
run_gen = 1.O 1.E 2.O 2.E 3.O 3.E 4.O 4.E 5.O 5.E 6.O 6.E 7.O 7.E 8.O 8.E 9.O \
9.E leap-1.O leap-1.E U95-1.O U95-1.E U95-2.O U95-2.E U95-3.O U95-3.E U92-1.O \
U92-1.E U92-2.O U92-2.E U92-3.O U92-3.E V92-1.O V92-1.E V92-2.O V92-2.E \
@@ -22,7 +22,7 @@ next-w.E next-mo.O next-mo.E next-y.O next-y.E utc-0.O utc-0.E utc-0a.O \
utc-0a.E utc-1.O utc-1.E utc-1a.O utc-1a.E date2sec-0.O date2sec-0.E \
date2sec-0a.O date2sec-0a.E date2sec-1.O date2sec-1.E sec2date-0.O \
sec2date-0.E this-m.O this-m.E this-h.O this-h.E this-w.O this-w.E this-mo.O \
-this-mo.E this-y.O this-y.E risks-1.O risks-1.E
+this-mo.E this-y.O this-y.E risks-1.O risks-1.E regress-1.O regress-1.E
##test-files-end
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/date/Makefile.in b/tests/date/Makefile.in
index 2769f83e4..d7e88b3e0 100644
--- a/tests/date/Makefile.in
+++ b/tests/date/Makefile.in
@@ -118,7 +118,7 @@ W92-3.X millen-1.X rel-0.X rel-1a.X rel-1b.X rel-2a.X rel-2b.X rel-2c.X \
rel-2d.X rel-2e.X rel-2f.X rel-2g.X rel-3a.X next-s.X next-m.X next-h.X \
next-d.X next-w.X next-mo.X next-y.X utc-0.X utc-0a.X utc-1.I utc-1.X \
utc-1a.I utc-1a.X date2sec-0.X date2sec-0a.X date2sec-1.X sec2date-0.X \
-this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X
+this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X
run_gen = 1.O 1.E 2.O 2.E 3.O 3.E 4.O 4.E 5.O 5.E 6.O 6.E 7.O 7.E 8.O 8.E 9.O \
9.E leap-1.O leap-1.E U95-1.O U95-1.E U95-2.O U95-2.E U95-3.O U95-3.E U92-1.O \
@@ -132,7 +132,7 @@ next-w.E next-mo.O next-mo.E next-y.O next-y.E utc-0.O utc-0.E utc-0a.O \
utc-0a.E utc-1.O utc-1.E utc-1a.O utc-1a.E date2sec-0.O date2sec-0.E \
date2sec-0a.O date2sec-0a.E date2sec-1.O date2sec-1.E sec2date-0.O \
sec2date-0.E this-m.O this-m.E this-h.O this-h.E this-w.O this-w.E this-mo.O \
-this-mo.E this-y.O this-y.E risks-1.O risks-1.E
+this-mo.E this-y.O this-y.E risks-1.O risks-1.E regress-1.O regress-1.E
EXTRA_DIST = Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/date/date-tests b/tests/date/date-tests
index edd05d6a6..15ce13309 100755
--- a/tests/date/date-tests
+++ b/tests/date/date-tests
@@ -953,8 +953,25 @@ else
esac
fi
test -s risks-1.E || rm -f risks-1.E
+LANG=C $xx -u -d '1996-11-10 0:00:00 +0' '+%Y-%m-%d %T' > regress-1.O 2> regress-1.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test regress-1(LANG=C) failed: ../../src/date return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp regress-1.O $srcdir/regress-1.X > /dev/null 2>&1
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed regress-1(LANG=C)"; fi ;;
+ 1) $echo "Test regress-1(LANG=C) failed: files regress-1.O and $srcdir/regress-1.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test regress-1(LANG=C) may have failed." 1>&2;
+ $echo The command "cmp regress-1.O $srcdir/regress-1.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s regress-1.E || rm -f regress-1.E
if test $errors = 0 ; then
- $echo Passed all 55 tests. 1>&2
+ $echo Passed all 56 tests. 1>&2
else
$echo Failed $errors tests. 1>&2
fi