Browse Source

- add adler32 test

PHP-5.1
Michael Wallner 20 years ago
parent
commit
3cfdbdbd12
  1. 1
      ext/hash/package.xml
  2. 22
      ext/hash/tests/adler32.phpt

1
ext/hash/package.xml

@ -81,6 +81,7 @@ Initial Release
<file role="test" name="gost.phpt"/>
<file role="test" name="snefru.phpt"/>
<file role="test" name="crc32.phpt"/>
<file role="test" name="adler32.phpt"/>
</dir>
</filelist>

22
ext/hash/tests/adler32.phpt

@ -0,0 +1,22 @@
--TEST--
ADLER32
--SKIPIF--
<?php extension_loaded('hash') or die('skip'); ?>
--FILE--
<?php
echo hash('adler32', ''), "\n";
echo hash('adler32', 'a'), "\n";
echo hash('adler32', 'abc'), "\n";
echo hash('adler32', 'message digest'), "\n";
echo hash('adler32', 'abcdefghijklmnopqrstuvwxyz'), "\n";
echo hash('adler32', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), "\n";
echo hash('adler32', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'), "\n";
?>
--EXPECT--
01000000
62006200
27014d02
86057529
200b8690
0c15db8a
6910b697
Loading…
Cancel
Save