summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-01-27 03:15:14 +0000
committerJim Meyering <jim@meyering.net>1997-01-27 03:15:14 +0000
commitb103723acca33ed0add1abfa56ee8b9f3f4ad438 (patch)
treea2546df32adc706a3bf79a74d0f09cf3500a2bf1 /tests
parent03ebea3ec6f566db77134a1689cc0be151ab9174 (diff)
downloadcoreutils-b103723acca33ed0add1abfa56ee8b9f3f4ad438.tar.xz
.
Diffstat (limited to 'tests')
-rw-r--r--tests/date/Makefile.am6
-rw-r--r--tests/date/Makefile.in6
-rwxr-xr-xtests/date/date-tests19
3 files changed, 28 insertions, 3 deletions
diff --git a/tests/date/Makefile.am b/tests/date/Makefile.am
index 21f1c0fe5..b29961cb6 100644
--- a/tests/date/Makefile.am
+++ b/tests/date/Makefile.am
@@ -3,7 +3,11 @@
##test-files-begin
x = date
explicit =
-maint_gen =
+maint_gen = t1.exp t2.exp t3.exp t4.exp t5.exp t6.exp t7.exp t8.exp t9.exp \
+tleap-1.exp
+run_gen = t1.out t1.err t2.out t2.err t3.out t3.err t4.out t4.err t5.out \
+t5.err t6.out t6.err t7.out t7.err t8.out t8.err t9.out t9.err tleap-1.out \
+tleap-1.err
##test-files-end
EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/date/Makefile.in b/tests/date/Makefile.in
index ced74eb86..2a62e54d5 100644
--- a/tests/date/Makefile.in
+++ b/tests/date/Makefile.in
@@ -45,7 +45,11 @@ CC = @CC@
x = date
explicit =
-maint_gen =
+maint_gen = t1.exp t2.exp t3.exp t4.exp t5.exp t6.exp t7.exp t8.exp t9.exp \
+tleap-1.exp
+run_gen = t1.out t1.err t2.out t2.err t3.out t3.err t4.out t4.err t5.out \
+t5.err t6.out t6.err t7.out t7.err t8.out t8.err t9.out t9.err tleap-1.out \
+tleap-1.err
EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
noinst_SCRIPTS = $x-tests
diff --git a/tests/date/date-tests b/tests/date/date-tests
index 83e19a6fa..c09237181 100755
--- a/tests/date/date-tests
+++ b/tests/date/date-tests
@@ -162,8 +162,25 @@ else
esac
fi
test -s t9.err || rm -f t9.err
+LANG=C TZ=UTC $xx --date '02/29/1996 - 1 year' +%Y-%m-%d > tleap-1.out 2> tleap-1.err
+code=$?
+if test $code != 0 ; then
+ $echo "Test leap-1(LANG=C TZ=UTC) failed: ../../src/date return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp tleap-1.out $srcdir/tleap-1.exp
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed leap-1(LANG=C TZ=UTC)"; fi ;;
+ 1) $echo "Test leap-1(LANG=C TZ=UTC) failed: files tleap-1.out and $srcdir/tleap-1.exp differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test leap-1(LANG=C TZ=UTC) may have failed." 1>&2;
+ $echo The command "cmp tleap-1.out $srcdir/tleap-1.exp" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s tleap-1.err || rm -f tleap-1.err
if test $errors = 0 ; then
- $echo Passed all 9 tests. 1>&2
+ $echo Passed all 10 tests. 1>&2
else
$echo Failed $errors tests. 1>&2
fi