diff options
author | Anatol Belski <ab@php.net> | 2014-09-29 18:12:25 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-09-29 18:12:25 +0200 |
commit | 859913f6d40611ff3987c6ddee7aa9427d94988c (patch) | |
tree | e3b0a0450e4520e92014acf140e10b36dedfbd6e | |
parent | 91d3cd85593a19ff6ab3c334f74198472788021d (diff) | |
download | php-git-859913f6d40611ff3987c6ddee7aa9427d94988c.tar.gz |
fix tests on linux
-rw-r--r-- | ext/standard/tests/streams/proc_open_bug60120.phpt | 6 | ||||
-rw-r--r-- | ext/standard/tests/streams/proc_open_bug64438.phpt | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/ext/standard/tests/streams/proc_open_bug60120.phpt b/ext/standard/tests/streams/proc_open_bug60120.phpt index 978cbe62fe..8768257a2e 100644 --- a/ext/standard/tests/streams/proc_open_bug60120.phpt +++ b/ext/standard/tests/streams/proc_open_bug60120.phpt @@ -4,7 +4,11 @@ Bug #60120 proc_open hangs with stdin/out with 2048+ bytes <?php error_reporting(E_ALL); -$cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +if (substr(PHP_OS, 0, 3) == 'WIN') { + $cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +} else { + $cmd = PHP_BINARY . ' -n -r \'fwrite(STDOUT, $in = file_get_contents("php://stdin")); fwrite(STDERR, $in);\''; +} $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w')); $stdin = str_repeat('*', 1024 * 16) . '!'; $stdin = str_repeat('*', 2049 ); diff --git a/ext/standard/tests/streams/proc_open_bug64438.phpt b/ext/standard/tests/streams/proc_open_bug64438.phpt index e3288518d7..b3857d09d4 100644 --- a/ext/standard/tests/streams/proc_open_bug64438.phpt +++ b/ext/standard/tests/streams/proc_open_bug64438.phpt @@ -5,7 +5,11 @@ Bug #64438 proc_open hangs with stdin/out with 4097+ bytes error_reporting(E_ALL); -$cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +if (substr(PHP_OS, 0, 3) == 'WIN') { + $cmd = PHP_BINARY . ' -n -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"'; +} else { + $cmd = PHP_BINARY . ' -n -r \'fwrite(STDOUT, $in = file_get_contents("php://stdin")); fwrite(STDERR, $in);\''; +} $descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w')); $stdin = str_repeat('*', 4097); |