Commit | Line | Data |
---|---|---|
4e0554ec JH |
1 | # Test that md5 works on unaligned memory blocks |
2 | ||
3 | print "1..1\n"; | |
4 | ||
5 | use strict; | |
6 | use Digest::MD5 qw(md5_hex); | |
7 | ||
8 | my $str = "\100" x 20; | |
8be5f608 | 9 | substr($str, 0, 1) = ""; # chopping off first char makes the string unaligned |
4e0554ec JH |
10 | |
11 | #use Devel::Peek; Dump($str); | |
12 | ||
13 | print "not " unless md5_hex($str) eq "c7ebb510e59ee96f404f288d14cc656a"; | |
14 | print "ok 1\n"; | |
15 |