- fix INI entries
[m6w6/ext-http] / tests / run-tests.diff
1 Index: run-tests.php
2 ===================================================================
3 RCS file: /repository/php-src/run-tests.php,v
4 retrieving revision 1.223
5 diff -u -r1.223 run-tests.php
6 --- run-tests.php 18 Jul 2005 00:19:28 -0000 1.223
7 +++ run-tests.php 25 Jul 2005 12:28:31 -0000
8 @@ -926,6 +926,12 @@
9 $query_string = '';
10 }
11
12 + if (!empty($section_text['ENV'])) {
13 + foreach (explode("\n", $section_text['ENV']) as $env) {
14 + ($env = trim($env)) and putenv($env);
15 + }
16 + }
17 +
18 putenv("REDIRECT_STATUS=1");
19 putenv("QUERY_STRING=$query_string");
20 putenv("PATH_TRANSLATED=$tmp_file");
21 @@ -951,7 +957,7 @@
22 putenv("CONTENT_TYPE=");
23 putenv("CONTENT_LENGTH=");
24
25 - $cmd = "$php$pass_options$ini_settings -f \"$tmp_file\" $args 2>&1";
26 + $cmd = "$php$pass_options$ini_settings < \"$tmp_file\" $args 2>&1";
27 }
28
29 if ($DETAILED) echo "
30 @@ -968,6 +974,13 @@
31 // $out = `$cmd`;
32 $out = system_with_timeout($cmd);
33
34 + if (!empty($section_text['ENV'])) {
35 + foreach (explode("\n", $section_text['ENV']) as $env) {
36 + $env = explode('=', $env);
37 + putenv($env[0] .'=');
38 + }
39 + }
40 +
41 @unlink($tmp_post);
42
43 // Does the output match what is expected?