summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoriyoshi Koizumi <moriyoshi@php.net>2003-05-17 20:06:00 +0000
committerMoriyoshi Koizumi <moriyoshi@php.net>2003-05-17 20:06:00 +0000
commit80c75c4d6261a68704baceb4c415564bb8945dda (patch)
treea7632e8062b6926b5577dac24883ad8e32cd549a
parentbb1720a9d72664cd60fdfbd1bf430206ca2507b4 (diff)
downloadphp-git-80c75c4d6261a68704baceb4c415564bb8945dda.tar.gz
MFB(r-1.1.2.7): fix test
-rw-r--r--ext/standard/tests/file/bug22414.phpt10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/standard/tests/file/bug22414.phpt b/ext/standard/tests/file/bug22414.phpt
index 929c648e5d..45654078f4 100644
--- a/ext/standard/tests/file/bug22414.phpt
+++ b/ext/standard/tests/file/bug22414.phpt
@@ -10,8 +10,8 @@ Bug #22414: passthru() does not read data correctly
output_handler=
--FILE--
<?php
- $php = getenv('TEST_PHP_EXECUTABLE');
- $pwd = realpath(dirname(__FILE__));
+$php = getenv('TEST_PHP_EXECUTABLE');
+$tmpfile = tempnam('/tmp', 'phpt');
/* Regular Data Test */
passthru($php . ' -r " echo \"HELLO\"; "');
@@ -22,16 +22,16 @@ output_handler=
@unlink($pwd . '/passthru_test');
$cmd = $php . " -r \\\" readfile(@getenv(TEST_PHP_EXECUTABLE)); \\\"";
- $cmd = $php . ' -r \' passthru("'.$cmd.'"); \' > ' . $pwd . '/passthru_test';
+ $cmd = $php . ' -r \' passthru("'.$cmd.'"); \' > '.$tmpfile ;
exec($cmd);
- if (md5_file($php) == md5_file($pwd . '/passthru_test')) {
+ if (md5_file($php) == md5_file($tmpfile)) {
echo "Works\n";
} else {
echo "Does not work\n";
}
- @unlink($pwd . '/passthru_test');
+ @unlink($tmpfile);
?>
--EXPECT--
HELLO