summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-08-31 11:19:53 +0000
committerJim Meyering <jim@meyering.net>2003-08-31 11:19:53 +0000
commita95cc226133455f2f508f22e5ef96f1b2ee25894 (patch)
tree108fade2f0c80d7319360223e2a84cba28a17c41
parent7b1f0fa519f576eefb1eafd41e8a5fb3404cf763 (diff)
downloadcoreutils-a95cc226133455f2f508f22e5ef96f1b2ee25894.tar.xz
(check-bsd3): New test to make sure that
`md5sum --check' doesn't accept the BSD SHA1 format (adapted from `check-bsd' test in tests/sha1sum/basic-1).
-rwxr-xr-xtests/md5sum/basic-18
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/md5sum/basic-1 b/tests/md5sum/basic-1
index a7ba7d80a..f2b514e7e 100755
--- a/tests/md5sum/basic-1
+++ b/tests/md5sum/basic-1
@@ -45,6 +45,14 @@ my @Tests =
['check-bsd2', '--check', '--status',
{IN=> {'f.md5' => "MD5 (f) = $degenerate\n"}},
{AUX=> {f=> 'bar'}}, {EXIT=> 1}],
+ # The sha1sum and md5sum drivers share a lot of code.
+ # Ensure that md5sum does *not* share the part that makes
+ # sha1sum accept BSD format.
+ ['check-bsd3', '--check', {IN=> {'f.sha1' => "SHA1 (f) = $degenerate\n"}},
+ {AUX=> {f=> ''}},
+ {ERR=>"md5sum: f.sha1: no properly formatted "
+ . "MD5 checksum lines found\n"},
+ {EXIT=> 1}],
);
# Insert the `--text' argument for each test.