md5sum,sha*sum: ensure --ignore-missing fails when no file verified
commit6df26278d6cf5c6fad04d3fbaed4c06a223fb0bd
authorPádraig Brady <P@draigBrady.com>
Mon, 23 Nov 2015 17:11:26 +0000 (23 17:11 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 23 Nov 2015 18:06:38 +0000 (23 18:06 +0000)
tree7ba12d8c55aa67520373e668d50d1dfc0a27f27f
parent9fd0662faa4db68dea4fb4ba3f918b6a8f9598c4
md5sum,sha*sum: ensure --ignore-missing fails when no file verified

* src/md5sum.c (digest_check): Update a matched_checksums bool upon
matched checksum, and fail (loudly unless --status is specified)
if there were no matches.  Also change properly_formatted_lines
to a bool while at it since we don't need to track the plurality.
* tests/misc/md5sum.pl: Add a test case.
Suggested by Jim Meyering.
src/md5sum.c
tests/misc/md5sum.pl