summaryrefslogtreecommitdiff
path: root/tests/md5sum
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-01-30 03:22:44 +0000
committerJim Meyering <jim@meyering.net>1997-01-30 03:22:44 +0000
commitbca3705ac5e22cdb77bc6bc2ee9c738d0631382d (patch)
treedca2b8b35d6a6e997008ea37629dc234e0d0ef14 /tests/md5sum
parent9fcda065b6175195f1adfdd60a9833ba21ed0753 (diff)
downloadcoreutils-bca3705ac5e22cdb77bc6bc2ee9c738d0631382d.tar.xz
.
Diffstat (limited to 'tests/md5sum')
-rw-r--r--tests/md5sum/.cvsignore11
-rw-r--r--tests/md5sum/Makefile.am6
-rw-r--r--tests/md5sum/Makefile.in6
-rwxr-xr-xtests/md5sum/md5sum-tests231
4 files changed, 185 insertions, 69 deletions
diff --git a/tests/md5sum/.cvsignore b/tests/md5sum/.cvsignore
index 992c83aca..852508156 100644
--- a/tests/md5sum/.cvsignore
+++ b/tests/md5sum/.cvsignore
@@ -1,7 +1,8 @@
+*.I
+*.E
+*.X
+*.O
+*-tests
+build-script
Makefile
-join-tests
mk-script
-t*.exp
-t*.in
-t*.log
-t*.out
diff --git a/tests/md5sum/Makefile.am b/tests/md5sum/Makefile.am
index 10256cfe4..df7e25a95 100644
--- a/tests/md5sum/Makefile.am
+++ b/tests/md5sum/Makefile.am
@@ -3,10 +3,8 @@
##test-files-begin
x = md5sum
explicit =
-maint_gen = t1.in t1.exp t2.in t2.exp t3.in t3.exp t4.in t4.exp t5.in t5.exp \
-t6.in t6.exp t7.in t7.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
+maint_gen = 1.I 1.X 2.I 2.X 3.I 3.X 4.I 4.X 5.I 5.X 6.I 6.X 7.I 7.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
##test-files-end
EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
diff --git a/tests/md5sum/Makefile.in b/tests/md5sum/Makefile.in
index 0d371b575..d7b392254 100644
--- a/tests/md5sum/Makefile.in
+++ b/tests/md5sum/Makefile.in
@@ -44,10 +44,8 @@ CC = @CC@
x = md5sum
explicit =
-maint_gen = t1.in t1.exp t2.in t2.exp t3.in t3.exp t4.in t4.exp t5.in t5.exp \
-t6.in t6.exp t7.in t7.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
+maint_gen = 1.I 1.X 2.I 2.X 3.I 3.X 4.I 4.X 5.I 5.X 6.I 6.X 7.I 7.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
EXTRA_DIST = mk-script.pl Test.pm $x-tests $(explicit) $(maint_gen)
noinst_SCRIPTS = $x-tests
diff --git a/tests/md5sum/md5sum-tests b/tests/md5sum/md5sum-tests
index b3b7db0e3..6fee9f805 100755
--- a/tests/md5sum/md5sum-tests
+++ b/tests/md5sum/md5sum-tests
@@ -9,125 +9,244 @@ $echo testing program: $xx
errors=0
test "$srcdir" || srcdir=.
test "$VERBOSE" && $xx --version 2> /dev/null
-$xx < $srcdir/t1.in > t1.out 2> t1.err
+cat $srcdir/1.I | $xx > 1.O 2> 1.E
code=$?
if test $code != 0 ; then
- $echo "Test 1 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 1(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t1.out $srcdir/t1.exp
+ cmp 1.O $srcdir/1.X
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;
+ 0) if test "$VERBOSE" ; then $echo "passed 1(|)"; fi ;;
+ 1) $echo "Test 1(|) failed: files 1.O and $srcdir/1.X 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 ;
+ 2) $echo "Test 1(|) may have failed." 1>&2;
+ $echo The command "cmp 1.O $srcdir/1.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t1.err || rm -f t1.err
-$xx < $srcdir/t2.in > t2.out 2> t2.err
+test -s 1.E || rm -f 1.E
+$xx < $srcdir/1.I > 1.O 2> 1.E
code=$?
if test $code != 0 ; then
- $echo "Test 2 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 1(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t2.out $srcdir/t2.exp
+ cmp 1.O $srcdir/1.X
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;
+ 0) if test "$VERBOSE" ; then $echo "passed 1(<)"; fi ;;
+ 1) $echo "Test 1(<) failed: files 1.O and $srcdir/1.X 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 ;
+ 2) $echo "Test 1(<) may have failed." 1>&2;
+ $echo The command "cmp 1.O $srcdir/1.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t2.err || rm -f t2.err
-$xx < $srcdir/t3.in > t3.out 2> t3.err
+test -s 1.E || rm -f 1.E
+cat $srcdir/2.I | $xx > 2.O 2> 2.E
code=$?
if test $code != 0 ; then
- $echo "Test 3 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 2(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t3.out $srcdir/t3.exp
+ cmp 2.O $srcdir/2.X
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;
+ 0) if test "$VERBOSE" ; then $echo "passed 2(|)"; fi ;;
+ 1) $echo "Test 2(|) failed: files 2.O and $srcdir/2.X 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 ;
+ 2) $echo "Test 2(|) may have failed." 1>&2;
+ $echo The command "cmp 2.O $srcdir/2.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t3.err || rm -f t3.err
-$xx < $srcdir/t4.in > t4.out 2> t4.err
+test -s 2.E || rm -f 2.E
+$xx < $srcdir/2.I > 2.O 2> 2.E
code=$?
if test $code != 0 ; then
- $echo "Test 4 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 2(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t4.out $srcdir/t4.exp
+ cmp 2.O $srcdir/2.X
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;
+ 0) if test "$VERBOSE" ; then $echo "passed 2(<)"; fi ;;
+ 1) $echo "Test 2(<) failed: files 2.O and $srcdir/2.X 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 ;
+ 2) $echo "Test 2(<) may have failed." 1>&2;
+ $echo The command "cmp 2.O $srcdir/2.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t4.err || rm -f t4.err
-$xx < $srcdir/t5.in > t5.out 2> t5.err
+test -s 2.E || rm -f 2.E
+cat $srcdir/3.I | $xx > 3.O 2> 3.E
code=$?
if test $code != 0 ; then
- $echo "Test 5 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 3(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t5.out $srcdir/t5.exp
+ cmp 3.O $srcdir/3.X
case $? in
- 0) if test "$VERBOSE" ; then $echo "passed 5"; fi ;;
- 1) $echo "Test 5 failed: files t5.out and $srcdir/t5.exp differ" 1>&2;
+ 0) if test "$VERBOSE" ; then $echo "passed 3(|)"; fi ;;
+ 1) $echo "Test 3(|) failed: files 3.O and $srcdir/3.X differ" 1>&2;
errors=`expr $errors + 1` ;;
- 2) $echo "Test 5 may have failed." 1>&2;
- $echo The command "cmp t5.out $srcdir/t5.exp" failed. 1>&2 ;
+ 2) $echo "Test 3(|) may have failed." 1>&2;
+ $echo The command "cmp 3.O $srcdir/3.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t5.err || rm -f t5.err
-$xx < $srcdir/t6.in > t6.out 2> t6.err
+test -s 3.E || rm -f 3.E
+$xx < $srcdir/3.I > 3.O 2> 3.E
code=$?
if test $code != 0 ; then
- $echo "Test 6 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 3(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t6.out $srcdir/t6.exp
+ cmp 3.O $srcdir/3.X
case $? in
- 0) if test "$VERBOSE" ; then $echo "passed 6"; fi ;;
- 1) $echo "Test 6 failed: files t6.out and $srcdir/t6.exp differ" 1>&2;
+ 0) if test "$VERBOSE" ; then $echo "passed 3(<)"; fi ;;
+ 1) $echo "Test 3(<) failed: files 3.O and $srcdir/3.X differ" 1>&2;
errors=`expr $errors + 1` ;;
- 2) $echo "Test 6 may have failed." 1>&2;
- $echo The command "cmp t6.out $srcdir/t6.exp" failed. 1>&2 ;
+ 2) $echo "Test 3(<) may have failed." 1>&2;
+ $echo The command "cmp 3.O $srcdir/3.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t6.err || rm -f t6.err
-$xx < $srcdir/t7.in > t7.out 2> t7.err
+test -s 3.E || rm -f 3.E
+cat $srcdir/4.I | $xx > 4.O 2> 4.E
code=$?
if test $code != 0 ; then
- $echo "Test 7 failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ $echo "Test 4(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
errors=`expr $errors + 1`
else
- cmp t7.out $srcdir/t7.exp
+ cmp 4.O $srcdir/4.X
case $? in
- 0) if test "$VERBOSE" ; then $echo "passed 7"; fi ;;
- 1) $echo "Test 7 failed: files t7.out and $srcdir/t7.exp differ" 1>&2;
+ 0) if test "$VERBOSE" ; then $echo "passed 4(|)"; fi ;;
+ 1) $echo "Test 4(|) failed: files 4.O and $srcdir/4.X differ" 1>&2;
errors=`expr $errors + 1` ;;
- 2) $echo "Test 7 may have failed." 1>&2;
- $echo The command "cmp t7.out $srcdir/t7.exp" failed. 1>&2 ;
+ 2) $echo "Test 4(|) may have failed." 1>&2;
+ $echo The command "cmp 4.O $srcdir/4.X" failed. 1>&2 ;
errors=`expr $errors + 1` ;;
esac
fi
-test -s t7.err || rm -f t7.err
+test -s 4.E || rm -f 4.E
+$xx < $srcdir/4.I > 4.O 2> 4.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 4(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 4.O $srcdir/4.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 4(<)"; fi ;;
+ 1) $echo "Test 4(<) failed: files 4.O and $srcdir/4.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 4(<) may have failed." 1>&2;
+ $echo The command "cmp 4.O $srcdir/4.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 4.E || rm -f 4.E
+cat $srcdir/5.I | $xx > 5.O 2> 5.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 5(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 5.O $srcdir/5.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 5(|)"; fi ;;
+ 1) $echo "Test 5(|) failed: files 5.O and $srcdir/5.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 5(|) may have failed." 1>&2;
+ $echo The command "cmp 5.O $srcdir/5.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 5.E || rm -f 5.E
+$xx < $srcdir/5.I > 5.O 2> 5.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 5(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 5.O $srcdir/5.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 5(<)"; fi ;;
+ 1) $echo "Test 5(<) failed: files 5.O and $srcdir/5.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 5(<) may have failed." 1>&2;
+ $echo The command "cmp 5.O $srcdir/5.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 5.E || rm -f 5.E
+cat $srcdir/6.I | $xx > 6.O 2> 6.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 6(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 6.O $srcdir/6.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 6(|)"; fi ;;
+ 1) $echo "Test 6(|) failed: files 6.O and $srcdir/6.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 6(|) may have failed." 1>&2;
+ $echo The command "cmp 6.O $srcdir/6.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 6.E || rm -f 6.E
+$xx < $srcdir/6.I > 6.O 2> 6.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 6(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 6.O $srcdir/6.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 6(<)"; fi ;;
+ 1) $echo "Test 6(<) failed: files 6.O and $srcdir/6.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 6(<) may have failed." 1>&2;
+ $echo The command "cmp 6.O $srcdir/6.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 6.E || rm -f 6.E
+cat $srcdir/7.I | $xx > 7.O 2> 7.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 7(|) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 7.O $srcdir/7.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 7(|)"; fi ;;
+ 1) $echo "Test 7(|) failed: files 7.O and $srcdir/7.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 7(|) may have failed." 1>&2;
+ $echo The command "cmp 7.O $srcdir/7.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 7.E || rm -f 7.E
+$xx < $srcdir/7.I > 7.O 2> 7.E
+code=$?
+if test $code != 0 ; then
+ $echo "Test 7(<) failed: ../../src/md5sum return code $code differs from expected value 0" 1>&2
+ errors=`expr $errors + 1`
+else
+ cmp 7.O $srcdir/7.X
+ case $? in
+ 0) if test "$VERBOSE" ; then $echo "passed 7(<)"; fi ;;
+ 1) $echo "Test 7(<) failed: files 7.O and $srcdir/7.X differ" 1>&2;
+ errors=`expr $errors + 1` ;;
+ 2) $echo "Test 7(<) may have failed." 1>&2;
+ $echo The command "cmp 7.O $srcdir/7.X" failed. 1>&2 ;
+ errors=`expr $errors + 1` ;;
+ esac
+fi
+test -s 7.E || rm -f 7.E
if test $errors = 0 ; then
$echo Passed all 7 tests. 1>&2
else