1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 11:16:16 +02:00

New tests for --check exit status, and for BSD-style checksum files.

This commit is contained in:
Jim Meyering
2003-05-24 16:55:21 +00:00
parent 75247be90c
commit fab4d80dfb

View File

@@ -35,13 +35,23 @@ my @Tests =
{OUT=>"57edf4a22be3c955ac49da2e2107b67a f\n"}],
['backslash', {IN=> {".\\foo"=> ''}},
{OUT=>"\\$degenerate .\\\\foo\n"}],
['check-1', '--check', {AUX=> {f=> ''}},
{IN=> {'f.md5' => "$degenerate f\n"}},
{OUT=>"f: OK\n"}],
['check-2', '--check', '--status', {IN=>{'f.md5' => "$degenerate f\n"}},
{AUX=> {f=> 'foo'}}, {EXIT=> 1}],
['check-bsd', '--check', {IN=> {'f.md5' => "MD5 (f) = $degenerate\n"}},
{AUX=> {f=> ''}}, {OUT=>"f: OK\n"}],
['check-bsd2', '--check', '--status',
{IN=> {'f.md5' => "MD5 (f) = $degenerate\n"}},
{AUX=> {f=> 'bar'}}, {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};