diff options
author | Jim Meyering <jim@meyering.net> | 2003-05-24 16:49:40 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-05-24 16:49:40 +0000 |
commit | 92359d2df0801ffcbf461588214451b8acffb762 (patch) | |
tree | 1ce1f625f53070f107785dc55982eb1ebd13b9cd /tests/sha1sum/basic-1 | |
parent | e2ceb48225bd772570a02ed8569315fe90bedf63 (diff) | |
download | coreutils-92359d2df0801ffcbf461588214451b8acffb762.tar.xz |
Make sure `sha1sum --check' doesn't accept the BSD format.
Diffstat (limited to 'tests/sha1sum/basic-1')
-rwxr-xr-x | tests/sha1sum/basic-1 | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/sha1sum/basic-1 b/tests/sha1sum/basic-1 index 8910185b9..e2a708d57 100755 --- a/tests/sha1sum/basic-1 +++ b/tests/sha1sum/basic-1 @@ -39,13 +39,21 @@ my @Tests = {OUT=>"50abf5706a150990a08b2c5ea40fa0e585554732 f\n"}], ['bs-sha', {IN=> {".\\foo"=> ''}}, {OUT=>"\\$sha_degenerate .\\\\foo\n"}], + # The sha1sum and md5sum drivers share a lot of code. + # Ensure that sha1sum does *not* share the part that makes + # md5sum accept BSD format. + ['check-bsd', '--check', {IN=> {'f.md5' => "MD5 (f) = $sha_degenerate\n"}}, + {AUX=> {f=> ''}}, + {ERR=>"sha1sum: f.md5: no properly formatted " + . "SHA1 checksum lines found\n"}, + {EXIT=> 1}], ); # Insert the `--text' argument for each test. my $t; foreach $t (@Tests) { - splice @$t, 1, 0, '--text'; + splice @$t, 1, 0, '--text' unless @$t[1] =~ /--check/; } my $save_temps = $ENV{DEBUG}; |