2021-06-25 06:51:40 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
exitcode=0
|
|
|
|
|
|
|
|
testloop () {
|
|
|
|
opt=$1
|
|
|
|
sum=$2
|
|
|
|
|
|
|
|
for algorithm in sha512; do
|
|
|
|
for f in %%TESTSBASE%%/sbin/md5/*.inp; do
|
2021-06-25 08:37:51 +00:00
|
|
|
outbase=$(basename $f .inp)
|
2021-06-25 06:51:40 +00:00
|
|
|
$algorithm$sum $opt -p < $f > $outbase.out
|
2021-06-25 08:37:51 +00:00
|
|
|
diff %%TESTSBASE%%/sbin/md5/$outbase.$algorithm$sum-p.chk $outbase.out || exitcode=1
|
2021-06-25 06:51:40 +00:00
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
testloop "" ""
|
|
|
|
testloop -q ""
|
|
|
|
testloop -qr ""
|
|
|
|
testloop "" sum
|
|
|
|
testloop -q sum
|
|
|
|
|
|
|
|
exit $exitcode
|