summaryrefslogtreecommitdiff
path: root/tests/factor/factor-tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-02-19 03:38:52 +0000
committerJim Meyering <jim@meyering.net>1997-02-19 03:38:52 +0000
commit5234813a09891a2788384edc961667c80174e290 (patch)
tree60be8b367549d2d0e6b40258074d17583d20fef5 /tests/factor/factor-tests
parent3b8313838c6d23b7b0b48dfb2933c5be1d5e3c7d (diff)
downloadcoreutils-5234813a09891a2788384edc961667c80174e290.tar.xz
.
Diffstat (limited to 'tests/factor/factor-tests')
-rw-r--r--tests/factor/factor-tests427
1 files changed, 426 insertions, 1 deletions
diff --git a/tests/factor/factor-tests b/tests/factor/factor-tests
index 2847bdd3d..daa97e9b4 100644
--- a/tests/factor/factor-tests
+++ b/tests/factor/factor-tests
@@ -26,6 +26,23 @@ else
esac
fi
test -s 1.E || rm -f 1.E
+$xx 7 > 1a.O 2> 1a.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 1a failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 1a.O $srcdir/1a.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 1a"; fi ;;
+ 1) $echo "Test 1a failed: files 1a.O and $srcdir/1a.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 1a may have failed." 1>&2;
+ $echo The command "cmp 1a.O $srcdir/1a.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 1a.E || rm -f 1a.E
$xx 4294967291 > 2.O 2> 2.E
code=$?
if test $code != 0 ; then
@@ -77,8 +94,416 @@ else
esac
fi
test -s 4.E || rm -f 4.E
+$xx 4294966201 > a.O 2> a.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test a failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp a.O $srcdir/a.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed a"; fi ;;
+ 1) $echo "Test a failed: files a.O and $srcdir/a.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test a may have failed." 1>&2;
+ $echo The command "cmp a.O $srcdir/a.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s a.E || rm -f a.E
+$xx 4294966339 > b.O 2> b.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test b failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp b.O $srcdir/b.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed b"; fi ;;
+ 1) $echo "Test b failed: files b.O and $srcdir/b.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test b may have failed." 1>&2;
+ $echo The command "cmp b.O $srcdir/b.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s b.E || rm -f b.E
+$xx 4294966631 > c.O 2> c.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test c failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp c.O $srcdir/c.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed c"; fi ;;
+ 1) $echo "Test c failed: files c.O and $srcdir/c.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test c may have failed." 1>&2;
+ $echo The command "cmp c.O $srcdir/c.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s c.E || rm -f c.E
+$xx 4294966457 > d.O 2> d.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test d failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp d.O $srcdir/d.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed d"; fi ;;
+ 1) $echo "Test d failed: files d.O and $srcdir/d.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test d may have failed." 1>&2;
+ $echo The command "cmp d.O $srcdir/d.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s d.E || rm -f d.E
+$xx 4294966759 > e.O 2> e.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test e failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp e.O $srcdir/e.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed e"; fi ;;
+ 1) $echo "Test e failed: files e.O and $srcdir/e.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test e may have failed." 1>&2;
+ $echo The command "cmp e.O $srcdir/e.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s e.E || rm -f e.E
+$xx 4294966573 > f.O 2> f.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test f failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp f.O $srcdir/f.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed f"; fi ;;
+ 1) $echo "Test f failed: files f.O and $srcdir/f.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test f may have failed." 1>&2;
+ $echo The command "cmp f.O $srcdir/f.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s f.E || rm -f f.E
+$xx 4294967101 > g.O 2> g.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test g failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp g.O $srcdir/g.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed g"; fi ;;
+ 1) $echo "Test g failed: files g.O and $srcdir/g.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test g may have failed." 1>&2;
+ $echo The command "cmp g.O $srcdir/g.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s g.E || rm -f g.E
+$xx 4294966519 > h.O 2> h.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test h failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp h.O $srcdir/h.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed h"; fi ;;
+ 1) $echo "Test h failed: files h.O and $srcdir/h.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test h may have failed." 1>&2;
+ $echo The command "cmp h.O $srcdir/h.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s h.E || rm -f h.E
+$xx 4294966561 > i.O 2> i.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test i failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp i.O $srcdir/i.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed i"; fi ;;
+ 1) $echo "Test i failed: files i.O and $srcdir/i.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test i may have failed." 1>&2;
+ $echo The command "cmp i.O $srcdir/i.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s i.E || rm -f i.E
+$xx 4294966901 > j.O 2> j.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test j failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp j.O $srcdir/j.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed j"; fi ;;
+ 1) $echo "Test j failed: files j.O and $srcdir/j.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test j may have failed." 1>&2;
+ $echo The command "cmp j.O $srcdir/j.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s j.E || rm -f j.E
+$xx 4294966691 > k.O 2> k.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test k failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp k.O $srcdir/k.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed k"; fi ;;
+ 1) $echo "Test k failed: files k.O and $srcdir/k.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test k may have failed." 1>&2;
+ $echo The command "cmp k.O $srcdir/k.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s k.E || rm -f k.E
+$xx 4294966969 > l.O 2> l.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test l failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp l.O $srcdir/l.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed l"; fi ;;
+ 1) $echo "Test l failed: files l.O and $srcdir/l.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test l may have failed." 1>&2;
+ $echo The command "cmp l.O $srcdir/l.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s l.E || rm -f l.E
+$xx 4294967099 > m.O 2> m.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test m failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp m.O $srcdir/m.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed m"; fi ;;
+ 1) $echo "Test m failed: files m.O and $srcdir/m.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test m may have failed." 1>&2;
+ $echo The command "cmp m.O $srcdir/m.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s m.E || rm -f m.E
+$xx 4294966271 > n.O 2> n.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test n failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp n.O $srcdir/n.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed n"; fi ;;
+ 1) $echo "Test n failed: files n.O and $srcdir/n.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test n may have failed." 1>&2;
+ $echo The command "cmp n.O $srcdir/n.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s n.E || rm -f n.E
+$xx 4294966789 > o.O 2> o.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test o failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp o.O $srcdir/o.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed o"; fi ;;
+ 1) $echo "Test o failed: files o.O and $srcdir/o.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test o may have failed." 1>&2;
+ $echo The command "cmp o.O $srcdir/o.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s o.E || rm -f o.E
+$xx 4294966189 > p.O 2> p.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test p failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp p.O $srcdir/p.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed p"; fi ;;
+ 1) $echo "Test p failed: files p.O and $srcdir/p.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test p may have failed." 1>&2;
+ $echo The command "cmp p.O $srcdir/p.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s p.E || rm -f p.E
+$xx 4294967213 > q.O 2> q.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test q failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp q.O $srcdir/q.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed q"; fi ;;
+ 1) $echo "Test q failed: files q.O and $srcdir/q.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test q may have failed." 1>&2;
+ $echo The command "cmp q.O $srcdir/q.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s q.E || rm -f q.E
+$xx 4294967071 > s.O 2> s.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test s failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp s.O $srcdir/s.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed s"; fi ;;
+ 1) $echo "Test s failed: files s.O and $srcdir/s.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test s may have failed." 1>&2;
+ $echo The command "cmp s.O $srcdir/s.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s s.E || rm -f s.E
+$xx 4294966194 > t.O 2> t.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test t failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp t.O $srcdir/t.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed t"; fi ;;
+ 1) $echo "Test t failed: files t.O and $srcdir/t.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test t may have failed." 1>&2;
+ $echo The command "cmp t.O $srcdir/t.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s t.E || rm -f t.E
+$xx 4294966272 > u.O 2> u.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test u failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp u.O $srcdir/u.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed u"; fi ;;
+ 1) $echo "Test u failed: files u.O and $srcdir/u.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test u may have failed." 1>&2;
+ $echo The command "cmp u.O $srcdir/u.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s u.E || rm -f u.E
+$xx 4294966400 > v.O 2> v.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test v failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp v.O $srcdir/v.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed v"; fi ;;
+ 1) $echo "Test v failed: files v.O and $srcdir/v.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test v may have failed." 1>&2;
+ $echo The command "cmp v.O $srcdir/v.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s v.E || rm -f v.E
+$xx 4294966464 > w.O 2> w.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test w failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp w.O $srcdir/w.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed w"; fi ;;
+ 1) $echo "Test w failed: files w.O and $srcdir/w.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test w may have failed." 1>&2;
+ $echo The command "cmp w.O $srcdir/w.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s w.E || rm -f w.E
+$xx 4294966896 > x.O 2> x.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test x failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp x.O $srcdir/x.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed x"; fi ;;
+ 1) $echo "Test x failed: files x.O and $srcdir/x.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test x may have failed." 1>&2;
+ $echo The command "cmp x.O $srcdir/x.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s x.E || rm -f x.E
+$xx 4294966998 > y.O 2> y.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test y failed: ../../src/factor return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp y.O $srcdir/y.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed y"; fi ;;
+ 1) $echo "Test y failed: files y.O and $srcdir/y.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test y may have failed." 1>&2;
+ $echo The command "cmp y.O $srcdir/y.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s y.E || rm -f y.E
if test $errors = 0 ; then
- $echo Passed all 4 tests. 1>&2
+ $echo Passed all 29 tests. 1>&2
else
$echo Failed $errors tests. 1>&2
fi