]> granicus.if.org Git - php/commitdiff
- add a test case and update the skip clause
authorPierre Joye <pajoye@php.net>
Wed, 16 Dec 2009 10:09:34 +0000 (10:09 +0000)
committerPierre Joye <pajoye@php.net>
Wed, 16 Dec 2009 10:09:34 +0000 (10:09 +0000)
ext/standard/tests/strings/crypt_sha512.phpt

index a9132ea753b69adccc629c2aeda19896d702e48c..d6f9df6013985ee8edcb07da992105fd0f5ef8bc 100644 (file)
@@ -2,8 +2,8 @@
 crypt() SHA-512
 --SKIPIF--
 <?php
-if (!function_exists('crypt')) {
-       die("SKIP crypt() is not available");
+if (!function_exists('crypt') || !defined("CRYPT_SHA512")) {
+       die("SKIP crypt()-sha512 is not available");
 }
 ?> 
 --FILE--
@@ -44,7 +44,12 @@ $tests = array(
                b'$6$rounds=10$roundstoolow',
                b'the minimum number is still observed',
                b'$6$rounds=1000$roundstoolow$kUMsbe306n21p9R.FRkW3IGn.S9NPN0x50YhH1xhLsPuWGsUSklZt58jaTfF4ZEQpyUNGc0dqbpBYYBaHHrsX.'
-       )
+       ),
+       8 => array(
+               b'$6$$bar$',
+               b'foo',
+               b'$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.'
+       ),
 );
 
 foreach ($tests as $iter => $t) {