1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00
This commit is contained in:
Jim Meyering
1997-01-27 03:15:14 +00:00
parent 03ebea3ec6
commit b103723acc
4 changed files with 29 additions and 4 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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