php-src/ext/standard/tests/general_functions/proc_open.phpt
Derick Rethans a50e9acd8e - Skip test if the function to test is not available
#- Perhaps we need some infrastructure for this...
2003-01-18 13:53:25 +00:00

31 lines
442 B
PHP

--TEST--
proc_open
--SKIPIF--
<?php # vim:syn=php
if (!is_executable("/bin/cat")) echo "skip";
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
--POST--
--GET--
--FILE--
<?php
$ds = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
);
$cat = proc_open(
"/bin/cat",
$ds,
$pipes
);
proc_close($cat);
echo "I didn't segfault!\n";
?>
--EXPECT--
I didn't segfault!