fix tests for master
[m6w6/ext-http] / tests / etag001.phpt
index b3a2a5347fbe4207dc2425604e578a8e88805e96..e5e3d4a84cc97d56a0891029f530be1e01e7c197 100644 (file)
@@ -1,22 +1,22 @@
 --TEST--
 etags with hash
 --SKIPIF--
-<?php 
-include "skipif.inc"; 
-_ext("hash"); 
-version_compare(PHP_VERSION, "5.4.0", ">=") or die("skip PHP>=5.4 required");
+<?php
+include "skipif.inc";
+_ext("hash");
 ?>
 --FILE--
 <?php
 $body = new http\Message\Body;
 $body->append("Hello, my old fellow.");
 foreach (hash_algos() as $algo) {
-       if ($algo == "gost-crypto") continue;
-    ini_set("http.etag.mode", $algo);
-    printf("%10s: %s\n", 
-        $algo, 
-        $body->etag()
-    );
+    if (strncmp($algo, "sha3-", 5) && strncmp($algo, "sha512/", 7)) {
+        ini_set("http.etag.mode", $algo);
+        printf("%10s: %s\n",
+            $algo,
+            $body->etag()
+        );
+    }
 }
 ?>
 DONE
@@ -43,11 +43,14 @@ tiger192,4: e6a1628a4da8fa6adf4ca866c5e235b51939bb61ecf8423f
     snefru: 8f50c66c8f0a1510f9c591a2b7a070853d4770c60a38394c8857918dd91a2e5b
  snefru256: 8f50c66c8f0a1510f9c591a2b7a070853d4770c60a38394c8857918dd91a2e5b
       gost: efc79cdd01331adf80b30af816ff7a934f3f3df3085294a310918cacff3500f0
+gost-crypto: 2e6bd37841520cc9ccb8c7abd68bd3ec9ce601651b995f3639090f585cc23684
    adler32: 4ff5075d
      crc32: 757b06f7
     crc32b: e56655c5
     fnv132: ebd1fa1f
+   fnv1a32: 8e2ee037
     fnv164: 9790ce01eba3ae9f
+   fnv1a64: 43ef200fe3ef9b37
      joaat: 70a407c9
 haval128,3: 68a1bee33d2a4fa5543be7fa871f84ea
 haval160,3: b4204e8c4f3c993385d997539afa723888700bbd