diff options
author | Steph Fox <sfox@php.net> | 2008-05-14 21:29:51 +0000 |
---|---|---|
committer | Steph Fox <sfox@php.net> | 2008-05-14 21:29:51 +0000 |
commit | 6a0682d986c8e7fa16b51a8c3fd8f7cc01660426 (patch) | |
tree | 3f4902979371a318d695b6a09dc003c95b6a0258 /ext/phar/tests | |
parent | b3b5126954689c93baddbbe48f714594bf7dac13 (diff) | |
download | php-git-6a0682d986c8e7fa16b51a8c3fd8f7cc01660426.tar.gz |
- MFH
- Make internal code forward-compatible. This included a binary cast in the default stub, hence test updates.
Diffstat (limited to 'ext/phar/tests')
-rw-r--r-- | ext/phar/tests/files/phar_test.inc | 2 | ||||
-rw-r--r-- | ext/phar/tests/phar_commitwrite.phpt | 2 | ||||
-rw-r--r-- | ext/phar/tests/phar_convert_repeated.phpt | 2 | ||||
-rw-r--r-- | ext/phar/tests/phar_create_in_cwd.phpt | 2 | ||||
-rw-r--r-- | ext/phar/tests/phar_createdefaultstub.phpt | 22 | ||||
-rw-r--r-- | ext/phar/tests/phar_setdefaultstub.phpt | 20 | ||||
-rw-r--r-- | ext/phar/tests/tar/phar_convert_phar.phpt | 6 | ||||
-rw-r--r-- | ext/phar/tests/tar/phar_convert_phar2.phpt | 6 | ||||
-rw-r--r-- | ext/phar/tests/zip/phar_convert_phar.phpt | 6 |
9 files changed, 34 insertions, 34 deletions
diff --git a/ext/phar/tests/files/phar_test.inc b/ext/phar/tests/files/phar_test.inc index a5e9d3fdc8..0f989f9db1 100644 --- a/ext/phar/tests/files/phar_test.inc +++ b/ext/phar/tests/files/phar_test.inc @@ -36,7 +36,7 @@ foreach($files as $name => $cont) if (empty($comp)) $comp = $cont; if (empty($ulen)) $ulen = strlen($cont); if (empty($clen)) $clen = strlen($comp); - if (empty($crc32))$crc32= crc32($cont); + if (empty($crc32))$crc32= crc32((binary)$cont); if (isset($meta)) $meta = serialize($meta); // write manifest entry diff --git a/ext/phar/tests/phar_commitwrite.phpt b/ext/phar/tests/phar_commitwrite.phpt index 63878355b0..447d1e8309 100644 --- a/ext/phar/tests/phar_commitwrite.phpt +++ b/ext/phar/tests/phar_commitwrite.phpt @@ -29,7 +29,7 @@ unlink(dirname(__FILE__) . '/brandnewphar.phar'); __HALT_COMPILER(); ?> --EXPECT-- -int(6651) +int(6659) string(200) "<?php function __autoload($class) { diff --git a/ext/phar/tests/phar_convert_repeated.phpt b/ext/phar/tests/phar_convert_repeated.phpt index b2ef195ea7..fe0888ebbf 100644 --- a/ext/phar/tests/phar_convert_repeated.phpt +++ b/ext/phar/tests/phar_convert_repeated.phpt @@ -123,7 +123,7 @@ NULL bool(true) bool(false) bool(false) -int(6651) +int(6659) NULL ================= convertToZip() ===================== bool(false) diff --git a/ext/phar/tests/phar_create_in_cwd.phpt b/ext/phar/tests/phar_create_in_cwd.phpt index 83de7bed28..c4f74b6d6c 100644 --- a/ext/phar/tests/phar_create_in_cwd.phpt +++ b/ext/phar/tests/phar_create_in_cwd.phpt @@ -32,7 +32,7 @@ __HALT_COMPILER(); unlink(dirname(__FILE__) . '/brandnewphar.phar'); ?> --EXPECT-- -int(6651) +int(6659) string(200) "<?php function __autoload($class) { diff --git a/ext/phar/tests/phar_createdefaultstub.phpt b/ext/phar/tests/phar_createdefaultstub.phpt index a8648dc311..642aac9acc 100644 --- a/ext/phar/tests/phar_createdefaultstub.phpt +++ b/ext/phar/tests/phar_createdefaultstub.phpt @@ -34,7 +34,7 @@ echo $e->getMessage() . "\n"; ?> ===DONE=== --EXPECT-- -string(6651) "<?php +string(6659) "<?php $web = 'index.php'; @@ -144,7 +144,7 @@ const GZ = 0x1000; const BZ2 = 0x2000; const MASK = 0x3000; const START = 'index.php'; -const LEN = 6653; +const LEN = 6661; static function go($return = false) { @@ -298,7 +298,7 @@ die("Invalid internal .phar file (size error " . strlen($data) . " != " . $stat[7] . ")"); } -if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { +if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) { die("Invalid internal .phar file (checksum error)"); } @@ -328,7 +328,7 @@ Extract_Phar::go(); __HALT_COMPILER(); ?>" ============================================================================ ============================================================================ -string(6662) "<?php +string(6670) "<?php $web = 'index.php'; @@ -438,7 +438,7 @@ const GZ = 0x1000; const BZ2 = 0x2000; const MASK = 0x3000; const START = 'my/custom/thingy.php'; -const LEN = 6664; +const LEN = 6672; static function go($return = false) { @@ -592,7 +592,7 @@ die("Invalid internal .phar file (size error " . strlen($data) . " != " . $stat[7] . ")"); } -if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { +if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) { die("Invalid internal .phar file (checksum error)"); } @@ -622,7 +622,7 @@ Extract_Phar::go(); __HALT_COMPILER(); ?>" ============================================================================ ============================================================================ -int(7042) +int(7050) ============================================================================ ============================================================================ Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed @@ -630,7 +630,7 @@ Illegal filename passed in for stub creation, was 401 characters long, and only ============================================================================ ============================================================================ ============================================================================ -string(6664) "<?php +string(6672) "<?php $web = 'the/web.php'; @@ -740,7 +740,7 @@ const GZ = 0x1000; const BZ2 = 0x2000; const MASK = 0x3000; const START = 'my/custom/thingy.php'; -const LEN = 6666; +const LEN = 6674; static function go($return = false) { @@ -894,7 +894,7 @@ die("Invalid internal .phar file (size error " . strlen($data) . " != " . $stat[7] . ")"); } -if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { +if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) { die("Invalid internal .phar file (checksum error)"); } @@ -924,6 +924,6 @@ Extract_Phar::go(); __HALT_COMPILER(); ?>" ============================================================================ ============================================================================ -int(7042) +int(7050) Illegal web filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed ===DONE=== diff --git a/ext/phar/tests/phar_setdefaultstub.phpt b/ext/phar/tests/phar_setdefaultstub.phpt index a36c005eac..e907ca1236 100644 --- a/ext/phar/tests/phar_setdefaultstub.phpt +++ b/ext/phar/tests/phar_setdefaultstub.phpt @@ -54,7 +54,7 @@ try { unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar'); ?> --EXPECT-- -string(6653) "<?php +string(6661) "<?php $web = 'index.php'; @@ -164,7 +164,7 @@ const GZ = 0x1000; const BZ2 = 0x2000; const MASK = 0x3000; const START = 'index.php'; -const LEN = 6653; +const LEN = 6661; static function go($return = false) { @@ -318,7 +318,7 @@ die("Invalid internal .phar file (size error " . strlen($data) . " != " . $stat[7] . ")"); } -if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { +if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) { die("Invalid internal .phar file (checksum error)"); } @@ -349,7 +349,7 @@ __HALT_COMPILER(); ?> " ============================================================================ ============================================================================ -string(6664) "<?php +string(6672) "<?php $web = 'index.php'; @@ -459,7 +459,7 @@ const GZ = 0x1000; const BZ2 = 0x2000; const MASK = 0x3000; const START = 'my/custom/thingy.php'; -const LEN = 6664; +const LEN = 6672; static function go($return = false) { @@ -613,7 +613,7 @@ die("Invalid internal .phar file (size error " . strlen($data) . " != " . $stat[7] . ")"); } -if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { +if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) { die("Invalid internal .phar file (checksum error)"); } @@ -644,7 +644,7 @@ __HALT_COMPILER(); ?> " ============================================================================ ============================================================================ -string(6666) "<?php +string(6674) "<?php $web = 'the/web.php'; @@ -754,7 +754,7 @@ const GZ = 0x1000; const BZ2 = 0x2000; const MASK = 0x3000; const START = 'my/custom/thingy.php'; -const LEN = 6666; +const LEN = 6674; static function go($return = false) { @@ -908,7 +908,7 @@ die("Invalid internal .phar file (size error " . strlen($data) . " != " . $stat[7] . ")"); } -if ($entry[3] != sprintf("%u", crc32($data) & 0xffffffff)) { +if ($entry[3] != sprintf("%u", crc32((binary)$data) & 0xffffffff)) { die("Invalid internal .phar file (checksum error)"); } @@ -939,6 +939,6 @@ __HALT_COMPILER(); ?> " ============================================================================ ============================================================================ -int(7044) +int(7052) Illegal filename passed in for stub creation, was 401 characters long, and only 400 or less is allowed ===DONE=== diff --git a/ext/phar/tests/tar/phar_convert_phar.phpt b/ext/phar/tests/tar/phar_convert_phar.phpt index 6a7d78ea8b..7ce221991b 100644 --- a/ext/phar/tests/tar/phar_convert_phar.phpt +++ b/ext/phar/tests/tar/phar_convert_phar.phpt @@ -47,12 +47,12 @@ __HALT_COMPILER(); ?> --EXPECT-- bool(false) -int(6651) +int(6659) bool(true) string(60) "<?php // tar-based phar archive stub file __HALT_COMPILER();" bool(true) -int(6651) +int(6659) bool(true) -int(6651) +int(6659) ===DONE=== diff --git a/ext/phar/tests/tar/phar_convert_phar2.phpt b/ext/phar/tests/tar/phar_convert_phar2.phpt index 496948b14c..03a6429d2a 100644 --- a/ext/phar/tests/tar/phar_convert_phar2.phpt +++ b/ext/phar/tests/tar/phar_convert_phar2.phpt @@ -49,14 +49,14 @@ __HALT_COMPILER(); ?> --EXPECT-- bool(false) -int(6651) +int(6659) bool(true) string(60) "<?php // tar-based phar archive stub file __HALT_COMPILER();" bool(true) int(4096) -int(6651) +int(6659) bool(true) bool(true) -int(6651) +int(6659) ===DONE=== diff --git a/ext/phar/tests/zip/phar_convert_phar.phpt b/ext/phar/tests/zip/phar_convert_phar.phpt index 815656dbf6..d511a0b36a 100644 --- a/ext/phar/tests/zip/phar_convert_phar.phpt +++ b/ext/phar/tests/zip/phar_convert_phar.phpt @@ -46,12 +46,12 @@ __HALT_COMPILER(); ?> --EXPECT-- bool(false) -int(6651) +int(6659) bool(true) string(60) "<?php // zip-based phar archive stub file __HALT_COMPILER();" bool(true) -int(6651) +int(6659) bool(true) -int(6651) +int(6659) ===DONE=== |