1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 19:23:22 +02:00

- Add new test

This commit is contained in:
Marcus Boerger
2006-03-10 22:55:09 +00:00
parent ce7c583dd9
commit 5ed0ce3ae4
2 changed files with 32 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
--TEST--
Phar include and parser error
--SKIPIF--
<?php if (!extension_loaded("phar")) print "skip"; ?>
--FILE--
<?php
$pharconfig = 3;
require_once 'phar_oo_test.inc';
Phar::loadPhar($fname);
$pname = 'phar://' . $fname . '/a.php';
var_dump(file_get_contents($pname));
require $pname;
?>
===DONE===
--CLEAN--
<?php
unlink(dirname(__FILE__) . '/phar_oo_test.phar.php');
__halt_compiler();
?>
--EXPECTF--
string(25) "<?php echo new new class;"
Parse error: syntax error, unexpected T_NEW, expecting T_STRING or T_VARIABLE or '$' in phar://%sphar_oo_test.phar.php/a.php on line %d
+3
View File
@@ -38,6 +38,9 @@ EOF;
7,777
EOF;
break;
case 3:
$files['a.php'] = '<?php echo new new class;';
break;
}
$manifest = '';