This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move Digest::MD5 from ext/ to cpan/
[perl5.git] / cpan / Digest-MD5 / t / align.t
CommitLineData
4e0554ec
JH
1# Test that md5 works on unaligned memory blocks
2
3print "1..1\n";
4
5use strict;
6use Digest::MD5 qw(md5_hex);
7
8my $str = "\100" x 20;
8be5f608 9substr($str, 0, 1) = ""; # chopping off first char makes the string unaligned
4e0554ec
JH
10
11#use Devel::Peek; Dump($str);
12
13print "not " unless md5_hex($str) eq "c7ebb510e59ee96f404f288d14cc656a";
14print "ok 1\n";
15