Skip to content

Commit ad000a6

Browse files
committed
Add test for bug #78569
1 parent ab5b670 commit ad000a6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Bug #78569 (proc_open() may require extra quoting)
3+
--SKIPIF--
4+
<?php
5+
if (PHP_OS_FAMILY !== 'Windows') die('skip this test is for Windows platforms only');
6+
?>
7+
--XFAIL--
8+
Before PHP 8.0.0 we would need to add extra quotes.
9+
--FILE--
10+
<?php
11+
// We are searching for the following line:
12+
// FIND ME
13+
$descriptorspec = array(['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']);
14+
$cmd = sprintf('"findstr" "/b" "/c:// FIND ME" "%s" 2>&1', __FILE__);
15+
$proc = proc_open($cmd, $descriptorspec, $pipes);
16+
fpassthru($pipes[1]);
17+
proc_close($proc);
18+
?>
19+
--EXPECT--
20+
// FIND ME

0 commit comments

Comments
 (0)