pajoye          Sun Aug 17 13:07:39 2008 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/ext/standard/tests/general_functions       bug41518.phpt 
  Log:
  - MFH: fix test (portable), use . as basedir and create the tmp dir in the 
test directory
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/general_functions/bug41518.phpt?r1=1.1.2.3&r2=1.1.2.3.2.1&diff_format=u
Index: php-src/ext/standard/tests/general_functions/bug41518.phpt
diff -u php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3 
php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3.2.1
--- php-src/ext/standard/tests/general_functions/bug41518.phpt:1.1.2.3  Mon Jun 
 4 17:18:51 2007
+++ php-src/ext/standard/tests/general_functions/bug41518.phpt  Sun Aug 17 
13:07:39 2008
@@ -3,17 +3,18 @@
 --SKIPIF--
 <?php
 /* let's use /tmp here */
-$tmp_dir = "/tmp";
-if (!is_dir($tmp_dir) || realpath($tmp_dir) !== $tmp_dir) {
+$tmp_dir = __DIR__ . '/tmp';
+mkdir($tmp_dir);
+if (!is_dir($tmp_dir)) {
        die("skip");
 }
 ?>
 --INI--
-open_basedir=/tmp/
+open_basedir=.
 --FILE--
 <?php
 
-$tmp_dir = "/tmp";
+$tmp_dir =  __DIR__ . '/tmp';
 $tmp_file = $tmp_dir."/bug41418.tmp";
 
 touch($tmp_file);
@@ -21,6 +22,7 @@
 var_dump(file_exists($tmp_file."nosuchfile")); //doesn't exist
 
 @unlink($tmp_file);
[EMAIL PROTECTED]($tmp_dir);
 
 echo "Done\n";
 ?>



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to