]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
.
authorJim Meyering <jim@meyering.net>
Tue, 18 Feb 1997 02:46:29 +0000 (02:46 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 18 Feb 1997 02:46:29 +0000 (02:46 +0000)
tests/factor/Makefile.am
tests/factor/Makefile.in
tests/factor/factor-tests

index b29961cb6c3bad327b85865c69604b4f1832cd78..bcc5c850030e181e08905538c1416f7ae4fea117 100644 (file)
@@ -1,13 +1,10 @@
 ## Process this file with automake to produce Makefile.in.
 
 ##test-files-begin
-x = date
+x = factor
 explicit =
-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
+maint_gen = t1.exp t2.exp t3.exp t4.exp
+run_gen = t1.out t1.err t2.out t2.err t3.out t3.err t4.out t4.err
 ##test-files-end
 
 EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
index 2a62e54d5aad6c5bc99d6e168babd8d2190ced45..16024d5d03bce95de7932004a43280bbc8a2f592 100644 (file)
@@ -43,13 +43,10 @@ GENCAT = @GENCAT@
 GMSGFMT = @GMSGFMT@
 CC = @CC@
 
-x = date
+x = factor
 explicit =
-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
+maint_gen = t1.exp t2.exp t3.exp t4.exp
+run_gen = t1.out t1.err t2.out t2.err t3.out t3.err t4.out t4.err
 
 EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
 noinst_SCRIPTS = $x-tests
@@ -83,7 +80,7 @@ default: all
 .SUFFIXES:
 .SUFFIXES: .pl
 $(srcdir)/Makefile.in: @MAINT@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL) 
-       cd $(top_srcdir) && automake --gnu tests/date/Makefile
+       cd $(top_srcdir) && automake --gnu tests/factor/Makefile
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
@@ -95,7 +92,7 @@ TAGS:
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
-subdir = tests/date
+subdir = tests/factor
 distdir: $(DISTFILES)
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6ea496a0a03c45b28149f1795a8d6326f3d81eef 100644 (file)
@@ -0,0 +1,86 @@
+#! /bin/sh
+# This script was generated automatically by build-script.
+case $# in
+  0) xx='../../src/factor';;
+  *) xx="$1";;
+esac
+test "$VERBOSE" && echo=echo || echo=:
+$echo testing program: $xx
+errors=0
+test "$srcdir" || srcdir=.
+test "$VERBOSE" && $xx --version 2> /dev/null
+$xx 9  > t1.out 2> t1.err
+code=$?
+if test $code != 0 ; then
+  $echo "Test 1 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+  errors=`expr $errors + 1`
+else
+  cmp t1.out $srcdir/t1.exp
+  case $? in
+    0) if test "$VERBOSE" ; then $echo "passed 1"; fi ;;
+    1) $echo "Test 1 failed: files t1.out and $srcdir/t1.exp differ" 1>&2;
+       errors=`expr $errors + 1` ;;
+    2) $echo "Test 1 may have failed." 1>&2;
+       $echo The command "cmp t1.out $srcdir/t1.exp" failed. 1>&2 ;
+       errors=`expr $errors + 1` ;;
+  esac
+fi
+test -s t1.err || rm -f t1.err
+$xx 4294967291  > t2.out 2> t2.err
+code=$?
+if test $code != 0 ; then
+  $echo "Test 2 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+  errors=`expr $errors + 1`
+else
+  cmp t2.out $srcdir/t2.exp
+  case $? in
+    0) if test "$VERBOSE" ; then $echo "passed 2"; fi ;;
+    1) $echo "Test 2 failed: files t2.out and $srcdir/t2.exp differ" 1>&2;
+       errors=`expr $errors + 1` ;;
+    2) $echo "Test 2 may have failed." 1>&2;
+       $echo The command "cmp t2.out $srcdir/t2.exp" failed. 1>&2 ;
+       errors=`expr $errors + 1` ;;
+  esac
+fi
+test -s t2.err || rm -f t2.err
+$xx 4294967292  > t3.out 2> t3.err
+code=$?
+if test $code != 0 ; then
+  $echo "Test 3 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+  errors=`expr $errors + 1`
+else
+  cmp t3.out $srcdir/t3.exp
+  case $? in
+    0) if test "$VERBOSE" ; then $echo "passed 3"; fi ;;
+    1) $echo "Test 3 failed: files t3.out and $srcdir/t3.exp differ" 1>&2;
+       errors=`expr $errors + 1` ;;
+    2) $echo "Test 3 may have failed." 1>&2;
+       $echo The command "cmp t3.out $srcdir/t3.exp" failed. 1>&2 ;
+       errors=`expr $errors + 1` ;;
+  esac
+fi
+test -s t3.err || rm -f t3.err
+$xx 4294967293  > t4.out 2> t4.err
+code=$?
+if test $code != 0 ; then
+  $echo "Test 4 failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+  errors=`expr $errors + 1`
+else
+  cmp t4.out $srcdir/t4.exp
+  case $? in
+    0) if test "$VERBOSE" ; then $echo "passed 4"; fi ;;
+    1) $echo "Test 4 failed: files t4.out and $srcdir/t4.exp differ" 1>&2;
+       errors=`expr $errors + 1` ;;
+    2) $echo "Test 4 may have failed." 1>&2;
+       $echo The command "cmp t4.out $srcdir/t4.exp" failed. 1>&2 ;
+       errors=`expr $errors + 1` ;;
+  esac
+fi
+test -s t4.err || rm -f t4.err
+if test $errors = 0 ; then
+  $echo Passed all 4 tests. 1>&2
+else
+  $echo Failed $errors tests. 1>&2
+fi
+test $errors = 0 || errors=1
+exit $errors