Skip to content

Commit b242925

Browse files
committed
Fix curl tests wrt. AppVeyor and curl updates
1 parent ee0ca64 commit b242925

File tree

3 files changed

+15
-9
lines changed

3 files changed

+15
-9
lines changed

ext/curl/tests/bug48203-win32.phpt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ echo "Ok\n";
3030
<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?>
3131
--EXPECTF--
3232
Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
33-
Hello World!
34-
Hello World!Ok
3533
%A
34+
Hello World!
35+
Hello World!* Closing connection 0
36+
Ok
3637

ext/curl/tests/bug54798-win32.phpt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,3 @@ Hello World!Ok for CURLOPT_FILE
6565

6666
%AOk for CURLOPT_INFILE
6767
===DONE===
68-
%A

ext/curl/tests/server.inc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,23 @@ function curl_cli_server_start() {
1313
$doc_root = __DIR__;
1414
$router = "responder/get.php";
1515

16-
$descriptorspec = array(
17-
0 => STDIN,
18-
1 => STDOUT,
19-
2 => STDERR,
20-
);
21-
2216
if (substr(PHP_OS, 0, 3) == 'WIN') {
17+
$descriptorspec = array(
18+
0 => STDIN,
19+
1 => STDOUT,
20+
2 => array("pipe", "w"),
21+
);
22+
2323
$cmd = "{$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
2424
$cmd .= " {$router}";
2525
$handle = proc_open(addslashes($cmd), $descriptorspec, $pipes, $doc_root, NULL, array("bypass_shell" => true, "suppress_errors" => true));
2626
} else {
27+
$descriptorspec = array(
28+
0 => STDIN,
29+
1 => STDOUT,
30+
2 => STDERR,
31+
);
32+
2733
$cmd = "exec {$php_executable} -t {$doc_root} -n -S " . PHP_CURL_SERVER_ADDRESS;
2834
$cmd .= " {$router}";
2935
$cmd .= " 2>/dev/null";

0 commit comments

Comments
 (0)