mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
Multiple tests had to be changed to escape the arguments in shell commands. Some tests are skipped because they behave differently with spaces in the path versus without. One notable example of this is the hashbang test which does not work because spaces in hashbangs paths are not supported in Linux. Co-authored-by: Michael Voříšek <mvorisek@mvorisek.cz>
35 lines
758 B
PHP
35 lines
758 B
PHP
--TEST--
|
|
Test basic argv multibyte API integration
|
|
--SKIPIF--
|
|
<?php
|
|
include "skipif.inc";
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$php = getenv('TEST_PHP_EXECUTABLE_ESCAPED');
|
|
|
|
$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php";
|
|
$argv_fl_escaped = escapeshellarg($argv_fl);
|
|
file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>");
|
|
|
|
var_dump(`$php -n $argv_fl_escaped 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`);
|
|
|
|
@unlink($argv_fl);
|
|
|
|
?>
|
|
--EXPECTF--
|
|
string(%d) "array(%d) {
|
|
[0]=>
|
|
string(%d) "%sargv_test.php"
|
|
[1]=>
|
|
string(18) "多字节字符串"
|
|
[2]=>
|
|
string(27) "マルチバイト文字列"
|
|
[3]=>
|
|
string(38) "многобайтоваястрока"
|
|
[4]=>
|
|
string(15) "flerbytesträng"
|
|
}
|
|
"
|