Update the EBCDIC MD5 checksums, and automate the process.
[p5sagit/p5-mst-13.2.git] / ext / Digest / MD5 / t / utf8.t
CommitLineData
2e60967a 1#!perl -w
2
3if ($] < 5.006) {
4 print "1..0\n";
5 exit;
6}
7
8print "1..3\n";
9
10use strict;
11use Digest::MD5 qw(md5_hex);
12
13my $str;
14$str = "foo\xFF\x{100}";
15
16eval {
17 print md5_hex($str);
18 print "not ok 1\n"; # should not run
19};
20print "not " unless $@ && $@ =~ /^(Big byte|Wide character)/;
21print "ok 1\n";
22
23chop($str); # only bytes left
24print "not " unless md5_hex($str) eq "503debffe559537231ed24f25651ec20";
25print "ok 2\n";
26
27# reference
28print "not " unless md5_hex("foo\xFF") eq "503debffe559537231ed24f25651ec20";
29print "ok 3\n";