cellog Mon Oct 13 04:21:20 2008 UTC Modified files: /php-src/ext/phar/tests/cache_list copyonwrite10.phar.phpt copyonwrite11.phar.phpt copyonwrite12.phar.phpt copyonwrite13.phar.phpt copyonwrite14.phar.phpt copyonwrite15.phar.phpt copyonwrite16.phar.phpt copyonwrite17.phar.phpt copyonwrite18.phar.phpt copyonwrite19.phar.phpt copyonwrite20.phar.phpt copyonwrite21.phar.phpt copyonwrite22.phar.phpt copyonwrite23.phar.phpt copyonwrite24.phar.phpt copyonwrite4.phar.phpt copyonwrite4a.phpt copyonwrite5.phar.phpt copyonwrite6.phar.phpt copyonwrite7.phar.phpt copyonwrite8.phar.phpt copyonwrite9.phar.phpt /php-src/ext/phar/tests/cache_list/files write10.phar write10.phar.inc write11.phar write11.phar.inc write12.phar write12.phar.inc write13.phar write13.phar.inc write14.phar write14.phar.inc write15.phar write15.phar.inc write16.phar write16.phar.inc write17.phar write17.phar.inc write18.phar write18.phar.inc write19.phar write19.phar.inc write2.phar.inc write20.phar write20.phar.inc write21.phar write21.phar.inc write22.phar write22.phar.inc write23.phar write23.phar.inc write24.phar write24.phar.inc write3.phar.inc write4.phar write4.phar.inc write5.phar write5.phar.inc write6.phar write6.phar.inc write7.phar write7.phar.inc write8.phar write8.phar.inc write9.phar write9.phar.inc write3.phar Log: MFB: add complete tests verifying copy-on-write for cached phars
http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite10.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite10.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite10.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite10.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,24 @@ +--TEST-- +Phar: copy-on-write test 10 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite10.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write10.phar +--EXPECTF-- +string(214) "<?php +$p = new Phar(__FILE__); +var_dump($p->getStub()); +$p2 = new Phar(__FILE__); +$a = fopen("phar://" . __FILE__ . "/test.txt", "r"); +$p->setStub($a); +echo $p2->getStub(),"\n"; +echo "ok\n"; +__HALT_COMPILER(); ?> +" +<?php __HALT_COMPILER(); ?> + +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite11.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite11.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite11.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite11.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,22 @@ +--TEST-- +Phar: copy-on-write test 11 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite11.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write11.phar +--EXPECTF-- +string(174) "<?php +$p = new Phar(__FILE__); +var_dump($p->getStub()); +$p2 = new Phar(__FILE__); +$p->setDefaultStub(); +echo strlen($p2->getStub()),"\n"; +echo "ok\n"; +__HALT_COMPILER(); ?> +" +6685 +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite12.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite12.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite12.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite12.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,24 @@ +--TEST-- +Phar: copy-on-write test 12 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite12.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write12.phar +--EXPECTF-- +array(2) { + ["hash"]=> + string(40) "0163F471460EA74F7636268D28289BF5A1E8BD72" + ["hash_type"]=> + string(5) "SHA-1" +} +array(2) { + ["hash"]=> + string(32) "%s" + ["hash_type"]=> + string(3) "MD5" +} +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite13.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite13.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite13.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite13.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,15 @@ +--TEST-- +Phar: copy-on-write test 13 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite13.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?> +--FILE_EXTERNAL-- +files/write13.phar +--EXPECTF-- +bool(false) +bool(true) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite14.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite14.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite14.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite14.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,15 @@ +--TEST-- +Phar: copy-on-write test 14 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite14.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?> +--FILE_EXTERNAL-- +files/write14.phar +--EXPECTF-- +bool(true) +bool(false) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite15.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite15.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite15.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite15.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 15 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite15.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write15.phar +--EXPECTF-- +bool(false) +bool(true) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite16.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite16.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite16.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite16.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 16 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite16.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write16.phar +--EXPECTF-- +bool(true) +bool(false) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite17.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite17.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite17.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite17.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 17 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite17.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write17.phar +--EXPECTF-- +NULL +string(2) "hi" +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite18.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite18.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite18.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite18.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 18 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite18.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write18.phar +--EXPECTF-- +100666 +100444 +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite19.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite19.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite19.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite19.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 19 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite19.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write19.phar +--EXPECTF-- +string(2) "hi" +string(3) "hi2" +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite20.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite20.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite20.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite20.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 20 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite20.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write20.phar +--EXPECTF-- +string(2) "hi" +NULL +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite21.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite21.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite21.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite21.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,15 @@ +--TEST-- +Phar: copy-on-write test 21 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite21.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?> +--FILE_EXTERNAL-- +files/write21.phar +--EXPECTF-- +bool(false) +bool(true) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite22.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite22.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite22.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite22.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,15 @@ +--TEST-- +Phar: copy-on-write test 22 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite22.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?> +--FILE_EXTERNAL-- +files/write22.phar +--EXPECTF-- +bool(true) +bool(false) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite23.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite23.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite23.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite23.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +--TEST-- +Phar: copy-on-write test 23 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite23.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?> +--FILE_EXTERNAL-- +files/write23.phar +--EXPECTF-- +bool(true) +bool(false) +bool(false) +bool(true) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite24.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite24.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite24.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite24.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,15 @@ +--TEST-- +Phar: copy-on-write test 24 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite24.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +<?php if (!extension_loaded("zlib")) die("skip no zlib extension"); ?> +--FILE_EXTERNAL-- +files/write24.phar +--EXPECTF-- +bool(false) +bool(true) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite4.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite4.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite4.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite4.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,15 @@ +--TEST-- +Phar: copy-on-write test 4 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite4.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write4.phar +--EXPECT-- +bool(false) +bool(true) +string(2) "hi" +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite4a.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite4a.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite4a.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite4a.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,20 @@ +--TEST-- +Phar: copy-on-write test 4a [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite4.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE-- +<?php +var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt')); +Phar::mount('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt', 'phar://' . dirname(__FILE__) . '/files/write4.phar/tobemounted'); +var_dump(file_exists('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt'), file_get_contents('phar://' . dirname(__FILE__) . '/files/write4.phar/testit.txt')); +?> +===DONE=== +--EXPECT-- +bool(false) +bool(true) +string(2) "hi" +===DONE=== \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite5.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite5.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite5.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite5.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,27 @@ +--TEST-- +Phar: copy-on-write test 5 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite5.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write5.phar +--CLEAN-- +<?php +unlink(dirname(__FILE__) . '/copyonwrite5/file1'); +unlink(dirname(__FILE__) . '/copyonwrite5/file2'); +rmdir(dirname(__FILE__) . '/copyonwrite5'); +?> +--EXPECTF-- +array(2) { + ["file1"]=> + string(%d) "%sfile1" + ["file2"]=> + string(%d) "%sfile2" +} +phar://%scopyonwrite5.phar.php%cfile1 file1 +phar://%scopyonwrite5.phar.php%cfile2 file2 +phar://%scopyonwrite5.phar.php%chi hi +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite6.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite6.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite6.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite6.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,27 @@ +--TEST-- +Phar: copy-on-write test 6 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite6.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write6.phar +--CLEAN-- +<?php +unlink(dirname(__FILE__) . '/copyonwrite6/file1'); +unlink(dirname(__FILE__) . '/copyonwrite6/file2'); +rmdir(dirname(__FILE__) . '/copyonwrite6'); +?> +--EXPECTF-- +array(2) { + ["file1"]=> + string(%d) "%sfile1" + ["file2"]=> + string(%d) "%sfile2" +} +phar://%scopyonwrite6.phar.php%cfile1 file1 +phar://%scopyonwrite6.phar.php%cfile2 file2 +phar://%scopyonwrite6.phar.php%chi hi +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite7.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite7.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite7.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite7.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 7 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite7.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write7.phar +--EXPECT-- +bool(true) +bool(false) +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite8.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite8.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite8.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite8.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,14 @@ +--TEST-- +Phar: copy-on-write test 8 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite8.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write8.phar +--EXPECTF-- +string(%s) "%scopyonwrite8.phar.php" +hi +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/copyonwrite9.phar.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/copyonwrite9.phar.phpt diff -u /dev/null php-src/ext/phar/tests/cache_list/copyonwrite9.phar.phpt:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/copyonwrite9.phar.phpt Mon Oct 13 04:21:19 2008 @@ -0,0 +1,23 @@ +--TEST-- +Phar: copy-on-write test 9 [cache_list] +--INI-- +default_charset=UTF-8 +phar.cache_list={PWD}/copyonwrite9.phar.php +phar.readonly=0 +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE_EXTERNAL-- +files/write9.phar +--EXPECTF-- +string(188) "<?php +$p = new Phar(__FILE__); +var_dump($p->getStub()); +$p2 = new Phar(__FILE__); +$p->setStub("<?php __HALT"."_COMPILER();"); +echo $p2->getStub(),"\n"; +echo "ok\n"; +__HALT_COMPILER(); ?> +" +<?php __HALT_COMPILER(); ?> + +ok \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write10.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write10.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write10.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write10.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write10.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write10.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,18 @@ +<?php + +$fname = dirname(__FILE__) . '/write10.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p->getStub()); +$p2 = new Phar(__FILE__); +$a = fopen("phar://" . __FILE__ . "/test.txt", "r"); +$p->setStub($a); +echo $p2->getStub(),"\n"; +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write11.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write11.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write11.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write11.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write11.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write11.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write11.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p->getStub()); +$p2 = new Phar(__FILE__); +$p->setDefaultStub(); +echo strlen($p2->getStub()),"\n"; +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write12.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write12.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write12.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write12.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write12.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write12.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write12.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p->getSignature()); +$p2 = new Phar(__FILE__); +$p->setSignatureAlgorithm(Phar::MD5); +var_dump($p->getSignature()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write13.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write13.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write13.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write13.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write13.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write13.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write13.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p["test.txt"]->isCompressed()); +$p2 = new Phar(__FILE__); +$p->compressFiles(Phar::GZ); +var_dump($p["test.txt"]->isCompressed()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write14.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write14.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write14.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write14.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write14.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write14.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,18 @@ +<?php + +$fname = dirname(__FILE__) . '/write14.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p["test.txt"]->isCompressed()); +$p2 = new Phar(__FILE__); +$p->decompressFiles(); +var_dump($p["test.txt"]->isCompressed()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +$phar->compressFiles(Phar::GZ); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write15.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write15.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write15.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write15.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write15.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write15.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,16 @@ +<?php + +$fname = dirname(__FILE__) . '/write15.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump(isset($p["copied"])); +$p->copy("test.txt","copied"); +var_dump(isset($p["copied"])); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write16.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write16.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write16.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write16.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write16.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write16.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write16.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump(isset($p["test.txt"])); +unset($p["test.txt"]); +var_dump(isset($p["test.txt"])); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +$phar['test2.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write17.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write17.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write17.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write17.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write17.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write17.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,16 @@ +<?php + +$fname = dirname(__FILE__) . '/write17.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p->getMetadata()); +$p->setMetadata("hi"); +var_dump($p->getMetadata()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write18.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write18.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write18.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write18.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write18.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write18.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write18.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n"; +$p["test.txt"]->chmod(0444); +echo decoct(fileperms("phar://" . __FILE__ . "/test.txt")),"\n"; +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +$phar["test.txt"]->chmod(0666); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write19.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write19.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write19.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write19.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write19.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write19.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write19.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p["test.txt"]->getMetadata()); +$p["test.txt"]->setMetadata("hi2"); +var_dump($p["test.txt"]->getMetadata()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +$phar["test.txt"]->setMetadata("hi"); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write2.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write2.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write2.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write2.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,23 @@ +<?php + +$fname = dirname(__FILE__) . '/write2.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$phar = new Phar(__FILE__); +var_dump($phar->getMetadata()); +mkdir("phar://" . __FILE__ . "/test"); +var_dump(is_dir("phar://" . __FILE__ . "/test")); +$phar2 = new Phar(__FILE__); +var_dump($phar2->getMetadata()); +var_dump(isset($phar["test"])); +var_dump(isset($phar2["test"])); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar->setMetadata('hi'); +$phar['test.txt'] = "hi +"; +$phar['test.txt']->setMetadata('hi'); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write20.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write20.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write20.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write20.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write20.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write20.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write20.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p["test.txt"]->getMetadata()); +$p["test.txt"]->delMetadata(); +var_dump($p["test.txt"]->getMetadata()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +$phar["test.txt"]->setMetadata("hi"); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write21.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write21.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write21.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write21.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write21.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write21.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,16 @@ +<?php + +$fname = dirname(__FILE__) . '/write21.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p["test.txt"]->isCompressed()); +$p["test.txt"]->compress(Phar::GZ); +var_dump($p["test.txt"]->isCompressed()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write22.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write22.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write22.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write22.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write22.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:19 2008 +++ php-src/ext/phar/tests/cache_list/files/write22.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,17 @@ +<?php + +$fname = dirname(__FILE__) . '/write22.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p["test.txt"]->isCompressed()); +$p["test.txt"]->decompress(); +var_dump($p["test.txt"]->isCompressed()); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +$phar['test.txt']->compress(Phar::GZ); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write23.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write23.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write23.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write23.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write23.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write23.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,16 @@ +<?php + +$fname = dirname(__FILE__) . '/write23.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump(isset($p["test.txt"]), isset($p["newname"])); +rename("phar://" . __FILE__ . "/test.txt", "phar://" . __FILE__ . "/newname"); +var_dump(isset($p["test.txt"]), isset($p["newname"])); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write24.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write24.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write24.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write24.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write24.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write24.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,18 @@ +<?php + +$fname = dirname(__FILE__) . '/write24.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump(isset($p["newname"])); +$fp = fopen("phar://" . __FILE__ . "/newname", "w"); +fwrite($fp, "hi"); +fclose($fp); +var_dump(isset($p["newname"])); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "<?php __HALT"."_COMPILER();"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write3.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write3.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write3.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write3.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,21 @@ +<?php + +$fname = dirname(__FILE__) . '/write3.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +clearstatcache(); +var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test")); +rmdir("phar://" . __FILE__ . "/test"); +clearstatcache(); +var_dump(file_exists("phar://" . __FILE__ . "/test"), is_dir("phar://" . __FILE__ . "/test")); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar->setMetadata('hi'); +$phar['test.txt'] = "hi +"; +$phar['test.txt']->setMetadata('hi'); +$phar->addEmptyDir('test'); +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write4.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write4.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write4.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write4.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write4.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write4.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,16 @@ +<?php + +$fname = dirname(__FILE__) . '/write4.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +var_dump(file_exists("phar://" . __FILE__ . "/test.txt")); +clearstatcache(); +Phar::mount("test.txt", "phar://" . __FILE__ . "/tobemounted"); +var_dump(file_exists("phar://" . __FILE__ . "/test.txt"), file_get_contents("phar://" . __FILE__ . "/test.txt")); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['tobemounted'] = "hi"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write5.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write5.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write5.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write5.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write5.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write5.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,27 @@ +<?php + +$fname = dirname(__FILE__) . '/write5.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$phar = new Phar(__FILE__); +$d = dirname(__FILE__) . "/copyonwrite5"; +mkdir($d); +file_put_contents($d . "/file1", "file1\n"); +file_put_contents($d . "/file2", "file2\n"); +var_dump($phar->buildFromDirectory($d)); +$phar2 = new Phar(__FILE__); +$arr = array(); +foreach ($phar2 as $name => $file) { + $arr[$name] = $file->getContent(); +} +asort($arr); +foreach ($arr as $name => $content) { + echo $name, " ", $content; +} +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['hi'] = "hi\n"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write6.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write6.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write6.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write6.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write6.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write6.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,27 @@ +<?php + +$fname = dirname(__FILE__) . '/write6.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$phar = new Phar(__FILE__); +$d = dirname(__FILE__) . "/copyonwrite6"; +mkdir($d); +file_put_contents($d . "/file1", "file1\n"); +file_put_contents($d . "/file2", "file2\n"); +var_dump($phar->buildFromIterator(new RecursiveDirectoryIterator($d),$d)); +$phar2 = new Phar(__FILE__); +$arr = array(); +foreach ($phar2 as $name => $file) { + $arr[$name] = $file->getContent(); +} +asort($arr); +foreach ($arr as $name => $content) { + echo $name, " ", $content; +} +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['hi'] = "hi\n"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write7.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write7.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write7.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write7.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write7.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write7.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,18 @@ +<?php + +$fname = dirname(__FILE__) . '/write7.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump(file_exists("phar://" . __FILE__ . "/test.txt")); +$p->delete("test.txt"); +clearstatcache(); +var_dump(file_exists("phar://" . __FILE__ . "/test.txt")); +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "hi +"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write8.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write8.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write8.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write8.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write8.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write8.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,18 @@ +<?php + +$fname = dirname(__FILE__) . '/write8.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p->getAlias()); +$p2 = new Phar(__FILE__); +$p->setAlias("hi"); +echo $p2->getAlias(),"\n"; +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "hi +"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write9.phar?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write9.phar http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write9.phar.inc?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write9.phar.inc diff -u /dev/null php-src/ext/phar/tests/cache_list/files/write9.phar.inc:1.2 --- /dev/null Mon Oct 13 04:21:20 2008 +++ php-src/ext/phar/tests/cache_list/files/write9.phar.inc Mon Oct 13 04:21:19 2008 @@ -0,0 +1,18 @@ +<?php + +$fname = dirname(__FILE__) . '/write9.phar'; [EMAIL PROTECTED]($fname); + +$phar = new Phar($fname); +$phar->setStub('<?php +$p = new Phar(__FILE__); +var_dump($p->getStub()); +$p2 = new Phar(__FILE__); +$p->setStub("<?php __HALT"."_COMPILER();"); +echo $p2->getStub(),"\n"; +echo "ok\n"; +__HALT_COMPILER(); +?>'); +$phar['test.txt'] = "hi +"; +?> http://cvs.php.net/viewvc.cgi/php-src/ext/phar/tests/cache_list/files/write3.phar?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/phar/tests/cache_list/files/write3.phar
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php