Skip to content

Commit dcc3255

Browse files
nielsdosmvorisek
andauthoredFeb 25, 2023
Fix GH-10489: run-tests.php does not escape path when building cmd (#10560)
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>
1 parent b14785c commit dcc3255

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+198
-160
lines changed
 

‎Zend/tests/bug40236.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ if (extension_loaded("readline")) die("skip Test doesn't support readline");
66
?>
77
--FILE--
88
<?php
9-
$php = getenv('TEST_PHP_EXECUTABLE');
10-
$cmd = "\"$php\" -n -d memory_limit=4M -a \"".__DIR__."\"/bug40236.inc";
9+
$php = getenv('TEST_PHP_EXECUTABLE_ESCAPED');
10+
$cmd = "$php -n -d memory_limit=4M -a \"".__DIR__."\"/bug40236.inc";
1111
echo `$cmd`;
1212
?>
1313
--EXPECT--

‎Zend/tests/bug60978.phpt

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
Bug #60978 (exit code incorrect)
33
--FILE--
44
<?php
5-
$php = getenv('TEST_PHP_EXECUTABLE');
6-
exec($php . ' -n -r "exit(2);"', $output, $exit_code);
5+
exec(getenv('TEST_PHP_EXECUTABLE_ESCAPED') . ' -n -r "exit(2);"', $output, $exit_code);
76
echo $exit_code;
87
?>
98
--EXPECT--

0 commit comments

Comments
 (0)