]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Add tests with filenames containing newline and backslash characters.
authorJim Meyering <jim@meyering.net>
Sun, 4 Oct 1998 03:01:12 +0000 (03:01 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 4 Oct 1998 03:01:12 +0000 (03:01 +0000)
tests/md5sum/basic-1

index 2d0571ab2a1c846ec6f9bca801ec15e1fbf7bfff..2cc6a3e8157f45c4767295855ea87850fad6fc94 100755 (executable)
@@ -19,10 +19,12 @@ use strict;
 # Turn off localisation of executable's ouput.
 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
 
+my $degenerate = "d41d8cd98f00b204e9800998ecf8427e";
+
 my @Tests =
     (
-     ['1', {IN=> {x=> ''}},    {OUT=>"d41d8cd98f00b204e9800998ecf8427e  x\n"}],
-     ['2', {IN=> {x=> 'a'}},           {OUT=>"0cc175b9c0f1b6a831c399e269772661  x\n"}],
+     ['1', {IN=> {x=> ''}},    {OUT=>"$degenerate  x\n"}],
+     ['2', {IN=> {x=> 'a'}},   {OUT=>"0cc175b9c0f1b6a831c399e269772661  x\n"}],
      ['3', {IN=> {x=> 'abc'}}, {OUT=>"900150983cd24fb0d6963f7d28e17f72  x\n"}],
      ['4', {IN=> {x=> 'message digest'}},
                                {OUT=>"f96b697d7cb7938d525a2f31aaf161d0  x\n"}],
@@ -32,6 +34,10 @@ my @Tests =
                                {OUT=>"d174ab98d277d9f5a5611c2c9f419d9f  x\n"}],
      ['7', {IN=> {x=> '1234567890' x 8}},
                                {OUT=>"57edf4a22be3c955ac49da2e2107b67a  x\n"}],
+     ['backslash', {IN=> {"\\.foo"=> ''}},
+                               {OUT=>"\\$degenerate  \\\\.foo\n"}],
+     ['newline', {IN=> {"a\nb"=> ''}},
+                               {OUT=>"\\$degenerate  a\\nb\n"}],
     );
 
 my $save_temps = $ENV{DEBUG};