mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
Make sure `sha1sum --check' doesn't accept the BSD format.
This commit is contained in:
1 parent
e2ceb48225
commit
92359d2df0
1 file changed
+9
-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};
|
||||
|
||||
Reference in new issue
Block a user