diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-04 23:08:20 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-06-04 23:08:20 +0000 |
commit | 8646ec68ba24f185a1a106726e009229c5917414 (patch) | |
tree | 876d7552bb5895ec2f799f72848c2f14a93a91db /regress/bin/md5/Makefile | |
parent | 0c8d3eee99348f3f0f51689a7d880c5af0fe05e7 (diff) |
trivial regression tests for md5/sha1/rmd160 driver
Diffstat (limited to 'regress/bin/md5/Makefile')
-rw-r--r-- | regress/bin/md5/Makefile | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/regress/bin/md5/Makefile b/regress/bin/md5/Makefile new file mode 100644 index 00000000000..71b4adec00e --- /dev/null +++ b/regress/bin/md5/Makefile @@ -0,0 +1,54 @@ +# $OpenBSD: Makefile,v 1.1 2001/06/04 23:08:18 millert Exp $ + +NOMAN= +NOPROG= + +regress: t1 t2 t3 t4 t5 t6 t7 + +t1: t1.out + @cmp -s ${.CURDIR}/testsuite.md5 t1.out || \ + echo 'MD5 test suite output does not match expected output' + +t2: t2.out + @cmp -s ${.CURDIR}/testsuite.sha1 t2.out || \ + echo 'SHA1 test suite output does not match expected output' + +t3: t3.out + @cmp -s ${.CURDIR}/testsuite.rmd160 t3.out || \ + echo 'RMD160 test suite output does not match expected output' + +t4: + @if md5 -s "" /dev/null >/dev/null 2>&1; then \ + echo "FAILED: md5 should not allow a string on the command line along with a filename"; \ + fi + +t5: t5.out + @cmp -s ${.CURDIR}/pipe_test.md5 t5.out || \ + echo '"echo hi | md5 -p" does not match expected output' + +t6: + @if echo hi | md5 -p /dev/null >/dev/null 2>&1; then \ + echo "FAILED: md5 should not allow a filename on the command line in -p mode"; \ + fi + +t7: + @if [ `md5 /dev/null /dev/null | wc -l` != 2 ]; then \ + echo "FAILED: md5 doesn't handle multiple files"; \ + fi + +t1.out: + md5 -x >$@ + +t2.out: + sha1 -x >$@ + +t3.out: + rmd160 -x >$@ + +t5.out: + echo hi | md5 -p >$@ + +.PHONY: t1 t2 t3 t4 t5 t6 t7 regress +CLEANFILES+=t1.out t2.out t3.out t5.out + +.include <bsd.prog.mk> |