File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
hash /
tests /
joaat.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:39 2012 UTC (12 years, 8 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
--TEST--
Jenkins's one-at-a-time
--SKIPIF--
<?php extension_loaded('hash') or die ('Skip - hash extension not available'); ?>
--FILE--
<?php
$tests = array(
array("hello world", "3e4a5a57"),
array("", 0),
array("", "000000"),
array("a", "ca2e9442"),
array("aa", "7081738e"),
);
$i = 0;
$pass = true;
foreach ($tests as $test) {
++$i;
$result = hash("joaat", $test[0]);
if ($result != $test[1]) {
echo "Iteration " . $i . " failed - expected '" . $test[1] . "', got '" . $result . "' for '" . $test[1] . "'\n";
$pass = false;
}
}
if($pass) {
echo "PASS";
}
?>
--EXPECT--
PASS
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>