diff options
Diffstat (limited to 'tests/md5sum/md5-rfc')
-rwxr-xr-x | tests/md5sum/md5-rfc | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/md5sum/md5-rfc b/tests/md5sum/md5-rfc new file mode 100755 index 000000000..19c2f883c --- /dev/null +++ b/tests/md5sum/md5-rfc @@ -0,0 +1,32 @@ +#! /bin/sh + +e=rfc-expected +rm -f $e +cat <<'EOF' > $e +d41d8cd98f00b204e9800998ecf8427e "" +0cc175b9c0f1b6a831c399e269772661 "a" +900150983cd24fb0d6963f7d28e17f72 "abc" +f96b697d7cb7938d525a2f31aaf161d0 "message digest" +c3fcd3d76192e4007dfb496cca67e13b "abcdefghijklmnopqrstuvwxyz" +d174ab98d277d9f5a5611c2c9f419d9f "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" +57edf4a22be3c955ac49da2e2107b67a "12345678901234567890123456789012345678901234567890123456789012345678901234567890" +EOF + +a=rfc-actual +rm -f $a +${MD5SUM:-md5sum} \ + --string="" \ + --string="a" \ + --string="abc" \ + --string="message digest" \ + --string="abcdefghijklmnopqrstuvwxyz" \ + --string="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" \ + --string="12345678901234567890123456789012345678901234567890123456789012345678901234567890" \ + > $a + +${DIFF:-diff} $e $a +result=$? + +rm -fr $e $a + +exit $result |