diff options
author | Anatol Belski <ab@php.net> | 2018-05-18 17:39:12 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2018-05-18 17:39:12 +0200 |
commit | b2429259af2d16894121066962410834f0565cbe (patch) | |
tree | e3fe67ad627994550e585c3aa8e59223d9d489d2 /ext/curl | |
parent | ee0ca6470dfcd97d84d7d4d24aface665f0022aa (diff) | |
download | php-git-b2429259af2d16894121066962410834f0565cbe.tar.gz |
Fix curl tests wrt. AppVeyor and curl updates
Diffstat (limited to 'ext/curl')
-rw-r--r-- | ext/curl/tests/bug48203-win32.phpt | 5 | ||||
-rw-r--r-- | ext/curl/tests/bug54798-win32.phpt | 1 | ||||
-rw-r--r-- | ext/curl/tests/server.inc | 18 |
3 files changed, 15 insertions, 9 deletions
diff --git a/ext/curl/tests/bug48203-win32.phpt b/ext/curl/tests/bug48203-win32.phpt index 947c33a3d1..d3affdb71d 100644 --- a/ext/curl/tests/bug48203-win32.phpt +++ b/ext/curl/tests/bug48203-win32.phpt @@ -30,7 +30,8 @@ echo "Ok\n"; <?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> --EXPECTF-- Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d -Hello World! -Hello World!Ok %A +Hello World! +Hello World!* Closing connection 0 +Ok diff --git a/ext/curl/tests/bug54798-win32.phpt b/ext/curl/tests/bug54798-win32.phpt index c3b240dea7..bce39903ba 100644 --- a/ext/curl/tests/bug54798-win32.phpt +++ b/ext/curl/tests/bug54798-win32.phpt @@ -65,4 +65,3 @@ Hello World!Ok for CURLOPT_FILE %AOk for CURLOPT_INFILE ===DONE=== -%A diff --git a/ext/curl/tests/server.inc b/ext/curl/tests/server.inc index ed351b72cb..27f0cbbc84 100644 --- a/ext/curl/tests/server.inc +++ b/ext/curl/tests/server.inc @@ -13,17 +13,23 @@ function curl_cli_server_start() { $doc_root = __DIR__; $router = "responder/get.php"; - $descriptorspec = array( - 0 => STDIN, - 1 => STDOUT, - 2 => STDERR, - ); - if (substr(PHP_OS, 0, 3) == 'WIN') { + $descriptorspec = array( + 0 => STDIN, + 1 => STDOUT, + 2 => array("pipe", "w"), + ); + $cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS; $cmd .= " {$router}"; $handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true)); } else { + $descriptorspec = array( + 0 => STDIN, + 1 => STDOUT, + 2 => STDERR, + ); + $cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS; $cmd .= " {$router}"; $cmd .= " 2>/dev/null"; |