mirror of
https://github.com/opnsense/src.git
synced 2026-04-05 01:15:30 -04:00
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.
8 lines
233 B
Bash
8 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
|