]> git.pld-linux.org Git - packages/php-pecl-libsodium.git/commitdiff
hack to make tests pass on php 5.5
authorElan Ruusamäe <glen@delfi.ee>
Fri, 29 Jan 2016 08:59:54 +0000 (10:59 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 29 Jan 2016 08:59:54 +0000 (10:59 +0200)
https://github.com/jedisct1/libsodium-php/issues/82

tests-php53.patch

index e0a335bd204054e93aeb0dc5478f41d6b5ef246f..2b28550b2cac400a8221874603ac0eadc87e8921 100644 (file)
@@ -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));
This page took 0.087631 seconds and 4 git commands to generate.