From: Greg Beaver Date: Sat, 26 Apr 2008 17:43:53 +0000 (+0000) Subject: add logic test to ensure stub is not overwritten when adding a file (zip currently... X-Git-Tag: RELEASE_2_0_0b1~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=489fe0331fa872bd4d1cd31a9d7e6d8bed9d3a23;p=php add logic test to ensure stub is not overwritten when adding a file (zip currently does this - bad zip) --- diff --git a/ext/phar/tests/phar_stub.phpt b/ext/phar/tests/phar_stub.phpt index 40216e55f3..ed306816e2 100644 --- a/ext/phar/tests/phar_stub.phpt +++ b/ext/phar/tests/phar_stub.phpt @@ -64,6 +64,16 @@ if (fread($fp, strlen('booya')) == 'booya') { echo 'failed - copied booya'; } fclose($fp); +$phar['testing'] = 'hi'; + +// ensure stub is not overwritten +$fp = fopen($fname, 'rb'); +echo fread($fp, strlen($file)) . "\n"; +if (fread($fp, strlen('booya')) == 'booya') { + echo 'failed - copied booya'; +} +fclose($fp); + ?> ===DONE=== --CLEAN-- @@ -78,4 +88,5 @@ __HALT_COMPILER(); booya + ===DONE===