Skip to content

Commit

Permalink
Don't generate script for proc_open_pipes tests
Browse files Browse the repository at this point in the history
Commit the generated script instead, which is much simpler than
the code generating it...
  • Loading branch information
nikic committed Mar 4, 2019
1 parent e27ba75 commit 6be93b2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 51 deletions.
21 changes: 0 additions & 21 deletions ext/standard/tests/general_functions/proc_open_pipes.inc

This file was deleted.

11 changes: 1 addition & 10 deletions ext/standard/tests/general_functions/proc_open_pipes1.phpt
Expand Up @@ -3,26 +3,17 @@ proc_open() with > 16 pipes
--FILE--
<?php

include dirname(__FILE__) . "/proc_open_pipes.inc";

for ($i = 3; $i<= 30; $i++) {
$spec[$i] = array('pipe', 'w');
}

$php = getenv("TEST_PHP_EXECUTABLE");
$callee = create_sleep_script();
$callee = __DIR__ . "/proc_open_pipes_sleep.inc";
proc_open("$php -n $callee", $spec, $pipes);

var_dump(count($spec));
var_dump($pipes);

?>
--CLEAN--
<?php
include dirname(__FILE__) . "/proc_open_pipes.inc";

unlink_sleep_script();

?>
--EXPECTF--
int(28)
Expand Down
11 changes: 1 addition & 10 deletions ext/standard/tests/general_functions/proc_open_pipes2.phpt
Expand Up @@ -3,24 +3,15 @@ proc_open() with no pipes
--FILE--
<?php

include dirname(__FILE__) . "/proc_open_pipes.inc";

$spec = array();

$php = getenv("TEST_PHP_EXECUTABLE");
$callee = create_sleep_script();
$callee = __DIR__ . "/proc_open_pipes_sleep.inc";
proc_open("$php -n $callee", $spec, $pipes);

var_dump(count($spec));
var_dump($pipes);

?>
--CLEAN--
<?php
include dirname(__FILE__) . "/proc_open_pipes.inc";

unlink_sleep_script();

?>
--EXPECT--
int(0)
Expand Down
11 changes: 1 addition & 10 deletions ext/standard/tests/general_functions/proc_open_pipes3.phpt
Expand Up @@ -3,14 +3,12 @@ proc_open() with invalid pipes
--FILE--
<?php

include dirname(__FILE__) . "/proc_open_pipes.inc";

for ($i = 3; $i<= 5; $i++) {
$spec[$i] = array('pipe', 'w');
}

$php = getenv("TEST_PHP_EXECUTABLE");
$callee = create_sleep_script();
$callee = __DIR__ . "/proc_open_pipes_sleep.inc";

$spec[$i] = array('pi');
proc_open("$php -n $callee", $spec, $pipes);
Expand All @@ -27,13 +25,6 @@ proc_open("$php -n $callee", $spec, $pipes);
var_dump($pipes);

echo "END\n";
?>
--CLEAN--
<?php
include dirname(__FILE__) . "/proc_open_pipes.inc";

unlink_sleep_script();

?>
--EXPECTF--
Warning: proc_open(): pi is not a valid descriptor spec/mode in %s on line %d
Expand Down
@@ -0,0 +1,2 @@
<?php
sleep(1);

0 comments on commit 6be93b2

Please sign in to comment.