diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt index 0236e9e1ea7..811ac786c8e 100644 --- a/ext/standard/tests/file/bug60120.phpt +++ b/ext/standard/tests/file/bug60120.phpt @@ -6,6 +6,7 @@ $php = getenv('TEST_PHP_EXECUTABLE'); if (!$php) { die("skip No php executable defined\n"); } +if (PHP_OS_FAMILY === 'Windows') die('skip not for Windows'); ?> --FILE-- = $stdinLen) { fclose($writePipes[0]); @@ -58,12 +62,21 @@ while ($pipes || $writePipes) { foreach ($r as $pipe) { $type = array_search($pipe, $pipes); $data = fread($pipe, 8192); - if (false === $data || feof($pipe)) { + if (feof($pipe)) { fclose($pipe); unset($pipes[$type]); + } elseif (false === $data) { + die('Failed to read from pipe'); + } else { + $procOutput[$type] = ($procOutput[$type] ?? '') . $data; } } } +foreach ($procOutput as $output) { + if ($output !== $stdin) { + die('Output does not match input: ' . $output); + } +} echo "OK."; ?> --EXPECT--