pajoye          Wed Jul  8 10:43:32 2009 UTC

  Modified files:              
    /php-src/ext/standard/tests/file    rename_variation7-win32.phpt 
  Log:
  - windows version
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation7-win32.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/file/rename_variation7-win32.phpt
diff -u /dev/null 
php-src/ext/standard/tests/file/rename_variation7-win32.phpt:1.2
--- /dev/null   Wed Jul  8 10:43:32 2009
+++ php-src/ext/standard/tests/file/rename_variation7-win32.phpt        Wed Jul 
 8 10:43:32 2009
@@ -0,0 +1,36 @@
+--TEST--
+Test rename() function: usage variations-8
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') die('skip.. for Windows');
+if (!function_exists("symlink")) die("skip symlinks are not supported");
+?>
+--FILE--
+<?php
+
+$tmp_link = __FILE__.".tmp.link";
+$tmp_link2 = __FILE__.".tmp.link2";
+
+if (symlink(dirname(__FILE__)."/there_is_no_such_file", $tmp_link)) {
+       rename($tmp_link, $tmp_link2);
+}
+
+clearstatcache();
+
+var_dump(readlink($tmp_link));
+var_dump(readlink($tmp_link2));
+
+...@unlink($tmp_link);
+...@unlink($tmp_link2);
+
+echo "Done\n";
+?>
+--EXPECTF--    
+Warning: symlink(): Could not fetch file information(error 2) in %s on line %d
+
+Warning: readlink(): Could not open file (error 2) in %s on line %d
+bool(false)
+
+Warning: readlink(): Could not open file (error 2) in %s on line %d
+bool(false)
+Done



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

Reply via email to