summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2020-02-21 10:32:45 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2020-02-21 10:32:45 +0100
commit1c6b08426200d21435e11ef6c5a2229b2174b9d5 (patch)
tree7219d42343620d3ab6033f17767f401d873b4ba9
parent2b50d905dfaf6304e95b994d9469411eb060b256 (diff)
parentad000a63e8a1b6aacbff5d7bd806abfe388c18eb (diff)
downloadphp-git-1c6b08426200d21435e11ef6c5a2229b2174b9d5.tar.gz
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Add test for bug #78569
-rw-r--r--ext/standard/tests/general_functions/bug78569.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/bug78569.phpt b/ext/standard/tests/general_functions/bug78569.phpt
new file mode 100644
index 0000000000..70d8a995a2
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug78569.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #78569 (proc_open() may require extra quoting)
+--SKIPIF--
+<?php
+if (PHP_OS_FAMILY !== 'Windows') die('skip this test is for Windows platforms only');
+?>
+--XFAIL--
+Before PHP 8.0.0 we would need to add extra quotes.
+--FILE--
+<?php
+// We are searching for the following line:
+// FIND ME
+$descriptorspec = array(['pipe', 'r'], ['pipe', 'w'], ['pipe', 'w']);
+$cmd = sprintf('"findstr" "/b" "/c:// FIND ME" "%s" 2>&1', __FILE__);
+$proc = proc_open($cmd, $descriptorspec, $pipes);
+fpassthru($pipes[1]);
+proc_close($proc);
+?>
+--EXPECT--
+// FIND ME