884fc5527a
While the correctness of the supported hash algorithms can be tested with the built-in self-test feature, these test cases are meant to detect changes in the output format. A follow-up commit will improve the compatibility with the coreutils versions of the hash programs, and these tests should detect any unintended side-effects of such a change on existing functionality.
9 lines
233 B
Bash
9 lines
233 B
Bash
#!/bin/sh
|
|
|
|
while read algorithm; do
|
|
$algorithm -x > self-test.$algorithm.out || exitcode=$?
|
|
diff %%TESTSBASE%%/sbin/md5/self-test.$algorithm.chk self-test.$algorithm.out
|
|
done < %%TESTSBASE%%/sbin/md5/algorithms.txt
|
|
|
|
exit $exitcode
|