summaryrefslogtreecommitdiff
path: root/tests/md5sum
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-24 16:55:21 +0000
committerJim Meyering <jim@meyering.net>2003-05-24 16:55:21 +0000
commitfab4d80dfbb84eed3cf2d1f12211987d074b489c (patch)
treedd6ec8a09f658ed76f8db87ff4d3c5fa31f558c4 /tests/md5sum
parent75247be90cd8c55b44e52d792e6f20d5ee490951 (diff)
downloadcoreutils-fab4d80dfbb84eed3cf2d1f12211987d074b489c.tar.gz
coreutils-fab4d80dfbb84eed3cf2d1f12211987d074b489c.tar.bz2
coreutils-fab4d80dfbb84eed3cf2d1f12211987d074b489c.zip
New tests for --check exit status, and for BSD-style checksum files.
Diffstat (limited to 'tests/md5sum')
-rwxr-xr-xtests/md5sum/basic-112
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/md5sum/basic-1 b/tests/md5sum/basic-1
index e76c304a3..a7ba7d80a 100755
--- a/tests/md5sum/basic-1
+++ b/tests/md5sum/basic-1
@@ -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};