[packages/php-pecl-libsodium] hack to make tests pass on php 5.5

glen glen at pld-linux.org
Fri Jan 29 10:00:11 CET 2016


commit 2fdbfb18bf17c7c219ea50ecfb2c49d5902d19bb
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Jan 29 10:59:54 2016 +0200

    hack to make tests pass on php 5.5
    
    https://github.com/jedisct1/libsodium-php/issues/82

 tests-php53.patch | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/tests-php53.patch b/tests-php53.patch
index e0a335b..2b28550 100644
--- a/tests-php53.patch
+++ b/tests-php53.patch
@@ -1,6 +1,7 @@
 
 upstream:
 https://github.com/jedisct1/libsodium-php/pull/81
+https://github.com/jedisct1/libsodium-php/issues/82
 
 --- php-pecl-libsodium-1.0.2/tests/utils.phpt	2016-01-28 21:43:00.641808352 +0200
 +++ php-pecl-libsodium-1.0.2/tests/utils.phpt	2016-01-28 21:45:37.116534064 +0200
@@ -9,7 +10,7 @@ https://github.com/jedisct1/libsodium-php/pull/81
  var_dump(!\Sodium\memcmp($b, $c));
  var_dump(!\Sodium\memcmp($b, 'String'));
 -$v = hex2bin('FFFF800102030405060708');
-+$v = "\xFF\xFF\x80\x01\x02\x03\x04\x05\x06\x07\x08";
++$v = ""."\xFF\xFF\x80\x01\x02\x03\x04\x05\x06\x07\x08";
  \Sodium\increment($v);
  var_dump(bin2hex($v));
  
@@ -18,8 +19,8 @@ https://github.com/jedisct1/libsodium-php/pull/81
       \Sodium\library_version_minor() >= 6)) {
 -    $v_1 = hex2bin('0102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F');
 -    $v_2 = hex2bin('0202030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F');
-+    $v_1 = "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
-+    $v_2 = "\x02\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
++    $v_1 = ""."\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
++    $v_2 = ""."\x02\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1A\x1B\x1C\x1D\x1E\x1F";
      var_dump(\Sodium\compare($v_1, $v_2));
      \Sodium\increment($v_1);
      var_dump(\Sodium\compare($v_1, $v_2));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-libsodium.git/commitdiff/2fdbfb18bf17c7c219ea50ecfb2c49d5902d19bb



More information about the pld-cvs-commit mailing list