summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2016-10-26 15:45:01 +0100
committerPádraig Brady <P@draigBrady.com>2016-10-26 20:42:30 +0100
commitd0ddfadfb27def2861f35b1a45190a4c1780b257 (patch)
tree4ec472c7d9dccc1ba082c550b683d03081dcf2cd /tests/misc
parent34d1aeaf315b97ac27d54b2af039126b1d5a34f4 (diff)
downloadcoreutils-d0ddfadfb27def2861f35b1a45190a4c1780b257.tar.xz
md5sum,sha*sum: fix --ignore-missing with checksums starting with 00
* NEWS: Mention the fix. * src/md5sum.c (digest_file): Add a new MISSING parameter to return whether the file was missing, separately from the digest. * tests/misc/md5sum.pl: Add a test case. Fixes http://bugs.gnu.org/24795
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/md5sum.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/misc/md5sum.pl b/tests/misc/md5sum.pl
index 2eb636937..6ea745721 100755
--- a/tests/misc/md5sum.pl
+++ b/tests/misc/md5sum.pl
@@ -149,6 +149,13 @@ my @Tests =
{ERR=>
"md5sum: f.md5: no file was verified\n"},
{EXIT=> 1}],
+ # coreutils-8.25 with --ignore-missing treated checksums starting with 00
+ # as if the file was not present
+ ['check-ignore-missing-6', '--check', '--ignore-missing',
+ {AUX=> {f=> '9t'}},
+ {IN=> {'f.md5' =>
+ "006999e6df389641adf1fa3a74801d9d f\n"}},
+ {OUT=>"f: OK\n"}],
['bsd-segv', '--check', {IN=> {'z' => "MD5 ("}}, {EXIT=> 1},
{ERR=> "$prog: z: no properly formatted MD5 checksum lines found\n"}],