Commit | Line | Data |
---|---|---|
4e0554ec | 1 | BEGIN { |
9a03235d | 2 | if ($ENV{PERL_CORE}) { |
3 | chdir 't' if -d 't'; | |
4 | @INC = '../lib'; | |
5 | } | |
4e0554ec | 6 | } |
7 | ||
8 | # Test that md5 works on unaligned memory blocks | |
9 | ||
10 | print "1..1\n"; | |
11 | ||
12 | use strict; | |
13 | use Digest::MD5 qw(md5_hex); | |
14 | ||
15 | my $str = "\100" x 20; | |
16 | substr($str, 0, 1, ""); # chopping off first char makes the string unaligned | |
17 | ||
18 | #use Devel::Peek; Dump($str); | |
19 | ||
20 | print "not " unless md5_hex($str) eq "c7ebb510e59ee96f404f288d14cc656a"; | |
21 | print "ok 1\n"; | |
22 |