diff options
Diffstat (limited to 'ext/phar/tests/bug53872.phpt')
| -rw-r--r-- | ext/phar/tests/bug53872.phpt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/phar/tests/bug53872.phpt b/ext/phar/tests/bug53872.phpt new file mode 100644 index 0000000..fd332fd --- /dev/null +++ b/ext/phar/tests/bug53872.phpt @@ -0,0 +1,28 @@ +--TEST--
+bug#53872 (internal corruption of phar)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip Test needs ext/zlib");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p=new Phar('bug53872-phar.phar');
+$p->buildFromDirectory(__DIR__ . "/bug53872/");
+$p->setStub('<?php __HALT_COMPILER();?\>');
+$p->compressFiles(Phar::GZ);
+
+print(file_get_contents('phar://bug53872-phar.phar/first.txt'));
+print(file_get_contents('phar://bug53872-phar.phar/second.txt'));
+print(file_get_contents('phar://bug53872-phar.phar/third.txt'));
+?>
+--CLEAN--
+<?php
+unlink("bug53872-phar.phar");
+?>
+--EXPECT--
+content of first.txt
+content of third.txt
+
|
