cvs: php4 /ext/standard/tests/file bug22414.phpt

From: Date: Sat, 19 Apr 2003 17:45:46 +0000
Subject: cvs: php4 /ext/standard/tests/file bug22414.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20393@lists.php.net to get a copy of this message
iliaa Sat Apr 19 13:45:46 2003 EDT Modified files: /php4/ext/standard/tests/file bug22414.phpt Log: Do not make the test rely on the availability of the cat command. Index: php4/ext/standard/tests/file/bug22414.phpt diff -u php4/ext/standard/tests/file/bug22414.phpt:1.3 php4/ext/standard/tests/file/bug22414.phpt:1.4 --- php4/ext/standard/tests/file/bug22414.phpt:1.3 Tue Mar 4 09:37:38 2003 +++ php4/ext/standard/tests/file/bug22414.phpt Sat Apr 19 13:45:46 2003 @@ -5,10 +5,6 @@ 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 @@ /* 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')) {

« previous php.cvs (#20393) next »