]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/md5/tests/coreutils-c-test.SH
sbin/md5: add md5sum to synopsis in the man-page
[FreeBSD/FreeBSD.git] / sbin / md5 / tests / coreutils-c-test.SH
1 #!/bin/sh
2
3 /bin/cp %%TESTSBASE%%/sbin/md5/*.inp . || exit 127
4
5 exitcode=0
6
7 testloop () {
8         opt=$1
9
10         while read algorithm; do
11                 ${algorithm}sum -c %%TESTSBASE%%/sbin/md5/${algorithm}.digest || exitcode=1
12                 ${algorithm}sum -c %%TESTSBASE%%/sbin/md5/${algorithm}sum.digest || exitcode=1
13         done < %%TESTSBASE%%/sbin/md5/algorithms.txt
14 }
15
16 testloop ""
17 testloop -q
18 testloop -r
19 testloop -qr
20
21 exit $exitcode