diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-04-19 17:45:46 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-04-19 17:45:46 +0000 |
commit | e4c38aec5a1393d175ccb048deff90285ff81ed8 (patch) | |
tree | 067df8273c80e30f27fc5cbbf4cb6f78a02641a4 | |
parent | e4183ae9809cacafcbfb4ab907df5e4036acea7a (diff) | |
download | php-git-e4c38aec5a1393d175ccb048deff90285ff81ed8.tar.gz |
Do not make the test rely on the availability of the cat command.
-rw-r--r-- | ext/standard/tests/file/bug22414.phpt | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt index 821eb4ecfe..6902b643b1 100644 --- a/ext/standard/tests/file/bug22414.phpt +++ b/ext/standard/tests/file/bug22414.phpt @@ -5,10 +5,6 @@ Bug #22414: passthru() does not read data correctly if (ini_get("safe_mode")) { die('skip this test cannot be run under safe-mode'); } - $cat_path = @shell_exec("which cat"); - if (empty($cat_path)) { - die('skip cat binary needed for this test is not avaliable'); - } ?> --POST-- --GET-- @@ -25,7 +21,8 @@ Bug #22414: passthru() does not read data correctly /* Binary Data Test */ @unlink($pwd . '/passthru_test'); - $cmd = $php . ' -r \' passthru("cat ' . $php . '"); \' > ' . $pwd . '/passthru_test'; + $cmd = "sapi/cli/php -r \\\" readfile(@getenv(TEST_PHP_EXECUTABLE)); \\\""; + $cmd = $php . ' -r \' passthru("'.$cmd.'"); \' > ' . $pwd . '/passthru_test'; exec($cmd); if (md5_file($php) == md5_file($pwd . '/passthru_test')) { |