my $EXPECT;
if (ord "A" == 193) { # EBCDIC
$EXPECT = <<EOT;
-aab6fda26844b46ca878f46394c52bb2 Changes
+fcc48d6bb88ca8065bf9ddfcb9e7483e Changes
0565ec21b15c0f23f4c51fb327c8926d README
-5d2a638a7323f5bd5b5c120c9330b99d MD5.pm
-de2c149900efee0fbb39ad87dea68a43 MD5.xs
+1965beb0e48253b694220fbb5d6230f5 MD5.pm
+5b3c24da3f70f3c0938cc7c205a28ab7 MD5.xs
276da0aa4e9a08b7fe09430c9c5690aa rfc1321.txt
EOT
} elsif ("\n" eq "\015") { # MacOS
$EXPECT = <<EOT;
-48ce3d9c310bd3173f6fe0a336f349cf Changes
-53a0461b093f6c9d3e03d31f7133e62c README
-7dcff59ab5cb7ad4998fb518047b2e59 MD5.pm
-10542966f7609cb13816dc6a18527775 MD5.xs
+f161f474603c54a0093ad2f6f93be33b Changes
+6c950a0211a5a28f023bb482037698cd README
+18178c90bc13d6824f6c96973b6e9433 MD5.pm
+2c7fdb2ffa3840dc4f8dcdcf13241015 MD5.xs
754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
EOT
} else {
# This is the output of: 'md5sum Changes README MD5.pm MD5.xs rfc1321.txt'
$EXPECT = <<EOT;
-d286d6c6a61e44e88d1deba9954ce37a Changes
+029fa5059ba0b2175cee09ab5d9b7b73 Changes
6c950a0211a5a28f023bb482037698cd README
-d31c9aefa1a9e40beda9fff1e1d9c02d MD5.pm
-df178436ead9d354d63089fa0e01af27 MD5.xs
+18178c90bc13d6824f6c96973b6e9433 MD5.pm
+2c7fdb2ffa3840dc4f8dcdcf13241015 MD5.xs
754b9db19f79dbc4992f7166eb0f37ce rfc1321.txt
EOT
}
for (split /^/, $EXPECT) {
my($md5hex, $file) = split ' ';
my $base = $file;
- print "# $base\n";
+# print "# $base\n";
if ($ENV{PERL_CORE}) {
if ($file eq 'rfc1321.txt') { # Don't have it in core.
print "ok ", ++$testno, " # Skip: PERL_CORE\n";
next;
}
if ($ENV{MAC_MD5SUM}) {
+ require Encode;
my $data = cat_file($file);
+ Encode::from_to($data, 'latin1', 'MacRoman');
print md5_hex($data), " $base\n";
next;
}