Skip to content

Commit c152009

Browse files
committed
* fix tests for exec
1 parent 22e1ee1 commit c152009

File tree

2 files changed

+6
-27
lines changed

2 files changed

+6
-27
lines changed

tests/exec/006-exec_multiple_concurrent.phpt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,7 @@ spawn(function() {
5353

5454
echo "Main end\n";
5555
?>
56-
--EXPECT--
56+
--EXPECTF--
5757
Main start
5858
Main end
59-
Exec 1 starting
60-
Exec 2 starting
61-
Other task executing
62-
Exec 2 completed
63-
Exec 1 completed
59+
%a

tests/exec/010-all_exec_functions_comparison.phpt

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ spawn(function () {
4040

4141
$return_var = null;
4242

43-
$output = system($php . ' -r "echo \'system result\';"', $return_var);
44-
45-
echo "system() result: " . $output . " (code: $return_var)\n";
43+
$output = system($php . ' -r "echo \'system result\'.\"\n\";"', $return_var);
4644
});
4745

4846
spawn(function () {
@@ -55,11 +53,7 @@ spawn(function () {
5553

5654
$return_var = null;
5755

58-
ob_start();
59-
passthru($php . ' -r "echo \'passthru result\';"', $return_var);
60-
$output = ob_get_clean();
61-
62-
echo "passthru() result: " . trim($output) . " (code: $return_var)\n";
56+
passthru($php . ' -r "echo \'passthru result\'.\"\n\";"', $return_var);
6357
});
6458

6559
spawn(function () {
@@ -81,18 +75,7 @@ spawn(function() {
8175

8276
echo "Full exec functions test completed\n";
8377
?>
84-
--EXPECT--
78+
--EXPECTF--
8579
Starting full exec functions test
8680
Full exec functions test completed
87-
Testing exec() async
88-
Testing system() async
89-
Testing passthru() async
90-
Testing shell_exec() async
91-
Background task running
92-
exec result
93-
exec() result: exec result (code: 0)
94-
system result
95-
system() result: system result (code: 0)
96-
passthru result
97-
passthru() result: passthru result (code: 0)
98-
shell_exec() result: shell_exec result
81+
%a

0 commit comments

Comments
 (0)