Skip to content

Commit b9e169e

Browse files
committed
Fix unstable sapi test, fix GH-9140
1 parent b948f80 commit b9e169e

File tree

3 files changed

+7
-49
lines changed

3 files changed

+7
-49
lines changed

sapi/cgi/cgi_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2271,6 +2271,7 @@ consult the installation file that came with this distribution, or visit \n\
22712271

22722272
case 'a': /* interactive mode */
22732273
printf("Interactive mode enabled\n\n");
2274+
fflush(stdout);
22742275
break;
22752276

22762277
case 'C': /* don't chdir to the script directory */

sapi/cgi/tests/005-win32.phpt

Lines changed: 0 additions & 34 deletions
This file was deleted.

sapi/cgi/tests/005.phpt

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
--TEST--
22
using invalid combinations of cmdline options
3-
--SKIPIF--
4-
<?php
5-
6-
if (substr(PHP_OS, 0, 3) == 'WIN') {
7-
die ("skip not for Windows");
8-
}
9-
10-
include "skipif.inc";
11-
?>
123
--FILE--
134
<?php
145

@@ -17,18 +8,18 @@ include "include.inc";
178
$php = get_cgi_path();
189
reset_env_vars();
1910

20-
var_dump(`$php -n -a -f 'wrong'`);
21-
var_dump(`$php -n -f 'wrong' -a`);
11+
var_dump(`$php -n -a -f "wrong"`);
12+
var_dump(`$php -n -f "wrong" -a`);
2213

2314
echo "Done\n";
2415
?>
2516
--EXPECT--
26-
string(51) "No input file specified.
27-
Interactive mode enabled
17+
string(51) "Interactive mode enabled
2818

19+
No input file specified.
2920
"
30-
string(51) "No input file specified.
31-
Interactive mode enabled
21+
string(51) "Interactive mode enabled
3222

23+
No input file specified.
3324
"
3425
Done

0 commit comments

Comments
 (0)