]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: md5sum: fix false failures on cygwin
authorPádraig Brady <P@draigBrady.com>
Mon, 11 Apr 2022 14:37:04 +0000 (15:37 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 12 Apr 2022 12:30:50 +0000 (13:30 +0100)
* tests/misc/md5sum-newline.pl: Avoid binary '*' tags when
comparing checksums.
* tests/misc/md5sum-bsd.sh: Avoid binary '*' tags so that we correctly
trigger the ambiguity test.
Reported by Bruno Haible

tests/misc/md5sum-bsd.sh
tests/misc/md5sum-newline.pl

index 8ff4a9a7151c31118271bb33bfbb6cc52d95c109..57188e863064684840ac08b0ba631eda7d52e07b 100755 (executable)
@@ -28,7 +28,7 @@ print_ver_ md5sum
 # I.e., one not starting with ' ' or '*'
 for i in 'a' ' b' '*c' 'dd' ' '; do
   echo "$i" > "$i"
-  md5sum "$i" >> check.md5sum || fail=1
+  md5sum --text "$i" >> check.md5sum || fail=1
 done
 sed 's/  / /' check.md5sum > check.md5
 
index 4997c2198e0fcab44d526bef9133f02050ab529f..a89b3ca7c112a0d27358937b9ab2cc63a1a0ff17 100755 (executable)
@@ -35,7 +35,7 @@ my $z = '--zero';
 my @Tests =
     (
      ['newline', $t, {IN=> {"a\nb"=> ''}}, {OUT=>"\\$degenerate  a\\nb\n"}],
-     ['zero', $z, {IN=> {"a\nb"=> ''}}, {OUT=>"$degenerate  a\nb\0"}],
+     ['zero', "$t $z", {IN=> {"a\nb"=> ''}}, {OUT=>"$degenerate  a\nb\0"}],
     );
 
 my $save_temps = $ENV{DEBUG};