diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-04-07 08:38:04 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-04-07 08:38:04 +0000 |
commit | 9070af9fb87632d66faa82c00ab8b5cf20323a2b (patch) | |
tree | 2845aed14c5ebdfab53d748a7996a0069263ee28 /t | |
parent | c5af4229019b04c7fa4be99300f8d9883c0bdf73 (diff) | |
download | perl-9070af9fb87632d66faa82c00ab8b5cf20323a2b.tar.gz |
Digests in lib/md5-file.t are for text files _without_ CRLF i.e. UNIX
style. So don't use binmode() on the handles so that Win32 etc. see
same sequence and produce same digests.
p4raw-id: //depot/perlio@9602
Diffstat (limited to 't')
-rw-r--r-- | t/lib/md5-file.t | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/lib/md5-file.t b/t/lib/md5-file.t index 861327193d..ca9cac7472 100644 --- a/t/lib/md5-file.t +++ b/t/lib/md5-file.t @@ -126,7 +126,9 @@ sub digest_file #print "$file $method\n"; open(FILE, $file) or die "Can't open $file: $!"; - binmode(FILE); +# Digests avove are generated on UNIX without CRLF +# so leave handles in text mode +# binmode(FILE); my $digest = Digest::MD5->new->addfile(*FILE)->$method(); close(FILE); @@ -138,7 +140,9 @@ sub cat_file my($file) = @_; local $/; # slurp open(FILE, $file) or die "Can't open $file: $!"; - binmode(FILE); +# Digests avove are generated on UNIX without CRLF +# so leave handles in text mode +# binmode(FILE); my $tmp = <FILE>; close(FILE); $tmp; |