sbin/md5: Create /usr/tests/sbin/md5 directory for placing tests
Author: Li-Wen Hsu <lwhsu@FreeBSD.org>
Sponsored by: The FreeBSD Foundation
(cherry picked from commit cb194afef50dc4e1473413a69462aaf03cfe0ce4)
sbin/md5: add tests
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.
(cherry picked from commit 884fc5527a3ffd9830b941cbec328de1623044cc)
sbin/md5: fix test case to not write outside temp directory
The bsd-p-test did create files 1.out .. 8.out in the test directory.
This has been fixed and the temporary output files are now written
to the temporary directory.
(cherry picked from commit 95d3044bbdadfca6120a3e7c61c9ebb9a476f369)