ant Wed Apr 30 13:53:51 2008 UTC Modified files: /php-src/ext/standard/tests/file rename_variation2-win32.phpt rename_variation8.phpt rename_variation3-win32.phpt rename_variation1-win32.phpt rename_variation9.phpt rename_basic.phpt rename_variation-win32.phpt Log: Break up complicated rename tests into some smaller more consumable chunks
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation2-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/rename_variation2-win32.phpt diff -u /dev/null php-src/ext/standard/tests/file/rename_variation2-win32.phpt:1.2 --- /dev/null Wed Apr 30 13:53:51 2008 +++ php-src/ext/standard/tests/file/rename_variation2-win32.phpt Wed Apr 30 13:53:50 2008 @@ -0,0 +1,61 @@ +--TEST-- +Test rename() function: usage variations +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) != 'WIN') { + die('skip.. only for Windows'); +} +?> +--FILE-- +<?php +/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] ); + Description: Renames a file or directory +*/ + +require dirname(__FILE__).'/file.inc'; + +$file_path = dirname(__FILE__); +mkdir("$file_path/rename_variation_dir"); + +/* Renaming a file and directory to numeric name */ +echo "\n*** Testing rename() by renaming a file and directory to numeric name ***\n"; +$fp = fopen($file_path."/rename_variation.tmp", "w"); +fclose($fp); + +// renaming existing file to numeric name +var_dump( rename($file_path."/rename_variation.tmp", $file_path."/12345") ); + +// ensure that rename worked fine +var_dump( file_exists($file_path."/rename_variation.tmp" ) ); // expecting false +var_dump( file_exists($file_path."/12345" ) ); // expecting true + +unlink($file_path."/12345"); + +// renaming a directory to numeric name +var_dump( rename($file_path."/rename_variation_dir/", $file_path."/12345") ); + +// ensure that rename worked fine +var_dump( file_exists($file_path."/rename_variation_dir" ) ); // expecting false +var_dump( file_exists($file_path."/12345" ) ); // expecting true + +rmdir($file_path."/12345"); + +echo "Done\n"; +?> +--CLEAN-- +<?php +$file_path = dirname(__FILE__); +unlink($file_path."/rename_variation_link.tmp"); +unlink($file_path."/rename_variation.tmp"); +rmdir($file_path."/rename_variation_dir"); +?> +--EXPECTF-- +*** Testing rename() by renaming a file and directory to numeric name *** +bool(true) +bool(false) +bool(true) +bool(true) +bool(false) +bool(true) +Done + http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation8.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/rename_variation8.phpt diff -u /dev/null php-src/ext/standard/tests/file/rename_variation8.phpt:1.2 --- /dev/null Wed Apr 30 13:53:51 2008 +++ php-src/ext/standard/tests/file/rename_variation8.phpt Wed Apr 30 13:53:50 2008 @@ -0,0 +1,67 @@ +--TEST-- +Test rename() function: variation +--FILE-- +<?php +/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] ); + Description: Renames a file or directory +*/ + +echo "\n*** Testing rename() on non-existing file ***\n"; +$file_path = dirname(__FILE__); + +// try renaming a non existing file +$src_name = $file_path."/non_existent_file.tmp"; +$dest_name = $file_path."/rename_variation8_new.tmp"; +var_dump( rename($src_name, $dest_name) ); + +// ensure that $dest_name didn't get created +var_dump( file_exists($src_name) ); // expecting false +var_dump( file_exists($dest_name) ); // expecting false + +// rename a existing dir to new name +echo "\n*** Testing rename() on existing directory ***\n"; +$dir_name = $file_path."/rename_basic_dir"; +mkdir($dir_name); +$new_dir_name = $file_path."/rename_basic_dir1"; +var_dump( rename($dir_name, $new_dir_name) ); +//ensure that $new_dir_name got created +var_dump( file_exists($dir_name) ); // expecting false +var_dump( file_exists($new_dir_name) ); // expecting true + +// try to rename an non_existing dir +echo "\n*** Testing rename() on non-existing directory ***\n"; +$non_existent_dir_name = $file_path."/non_existent_dir"; +$new_dir_name = "$file_path/rename_basic_dir2"; +var_dump( rename($non_existent_dir_name, $new_dir_name) ); +// ensure that $new_dir_name didn't get created +var_dump( file_exists($non_existent_dir_name) ); // expecting flase +var_dump( file_exists($new_dir_name) ); // expecting false + +echo "Done\n"; +?> +--CLEAN-- +<?php +unlink(dirname(__FILE__)."/rename_basic_new2.tmp"); +rmdir(dirname(__FILE__)."/rename_basic_dir1"); +?> +--EXPECTF-- +*** Testing rename() on non-existing file *** + +Warning: rename(%s/non_existent_file.tmp,%s/rename_variation8_new.tmp): No such file or directory in %s on line %d +bool(false) +bool(false) +bool(false) + +*** Testing rename() on existing directory *** +bool(true) +bool(false) +bool(true) + +*** Testing rename() on non-existing directory *** + +Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): No such file or directory in %s on line %d +bool(false) +bool(false) +bool(false) +Done + http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation3-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/rename_variation3-win32.phpt diff -u /dev/null php-src/ext/standard/tests/file/rename_variation3-win32.phpt:1.2 --- /dev/null Wed Apr 30 13:53:51 2008 +++ php-src/ext/standard/tests/file/rename_variation3-win32.phpt Wed Apr 30 13:53:50 2008 @@ -0,0 +1,68 @@ +--TEST-- +Test rename() function: usage variations +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) != 'WIN') { + die('skip.. only for Windows'); +} +?> +--FILE-- +<?php +/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] ); + Description: Renames a file or directory +*/ + +require dirname(__FILE__).'/file.inc'; + +/* creating directory */ +$file_path = dirname(__FILE__); +$dirname = "$file_path/rename_variation_dir"; +mkdir($dirname); + +/* test rename() by trying to rename an existing file/dir to the same name + and one another */ + +$filename = "$file_path/rename_variation.tmp"; +$fp = fopen($filename, "w"); +fclose($fp); + +echo "\n-- Renaming file to same file name --\n"; +var_dump( rename($filename, $filename) ); + +echo "\n-- Renaming directory to same directory name --\n"; +var_dump( rename($dirname, $dirname) ); + +echo "\n-- Renaming existing file to existing directory name --\n"; +var_dump( rename($filename, $dirname) ); + +echo "\n-- Renaming existing directory to existing file name --\n"; +$fp = fopen($filename, "w"); +fclose($fp); +var_dump( rename($dirname, $filename) ); + +echo "Done\n"; +?> +--CLEAN-- +<?php +$file_path = dirname(__FILE__); +unlink($file_path."/rename_variation_link.tmp"); +unlink($file_path."/rename_variation.tmp"); +rmdir($file_path."/rename_variation_dir"); +rmdir($file_path."/rename_variation.tmp"); +?> +--EXPECTF-- +-- Renaming file to same file name -- +bool(true) + +-- Renaming directory to same directory name -- +bool(true) + +-- Renaming existing file to existing directory name -- + +Warning: rename(%s/rename_variation.tmp,%s/rename_variation_dir): No such file or directory in %s on line %d +bool(false) + +-- Renaming existing directory to existing file name -- +bool(true) +Done + http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation1-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/rename_variation1-win32.phpt diff -u /dev/null php-src/ext/standard/tests/file/rename_variation1-win32.phpt:1.2 --- /dev/null Wed Apr 30 13:53:51 2008 +++ php-src/ext/standard/tests/file/rename_variation1-win32.phpt Wed Apr 30 13:53:50 2008 @@ -0,0 +1,81 @@ +--TEST-- +Test rename() function: usage variations +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) != 'WIN') { + die('skip.. only for Windows'); +} +?> +--FILE-- +<?php +/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] ); + Description: Renames a file or directory +*/ + +require dirname(__FILE__).'/file.inc'; + +/* creating directory */ +$file_path = dirname(__FILE__); + +// rename dirs across directories +echo "\n*** Testing rename() : renaming directory across directories ***\n"; +$src_dirs = array ( + /* Testing simple directory tree */ + "$file_path/rename_variation/", + + /* Testing a dir with trailing slash */ + "$file_path/rename_variation/", + + /* Testing dir with double trailing slashes */ + "$file_path//rename_variation//", +); + +$dest_dir = "$file_path/rename_variation_dir"; + +// create the $dest_dir +mkdir($dest_dir); + +$counter = 1; + +/* loop through each $src_dirs and rename it to $dest_dir */ +foreach($src_dirs as $src_dir) { + echo "-- Iteration $counter --\n"; + + // create the src dir + mkdir("$file_path/rename_variation/"); + // rename the src dir to a new dir in dest dir + var_dump( rename($src_dir, $dest_dir."/new_dir") ); + // ensure that dir was renamed + var_dump( file_exists($src_dir) ); // expecting false + var_dump( file_exists($dest_dir."/new_dir") ); // expecting true + + // remove the new dir + rmdir($dest_dir."/new_dir"); + $counter++; +} + +echo "Done\n"; +?> +--CLEAN-- +<?php +$file_path = dirname(__FILE__); +unlink($file_path."/rename_variation_link.tmp"); +unlink($file_path."/rename_variation.tmp"); +rmdir($file_path."/rename_variation_dir"); +?> +--EXPECTF-- +*** Testing rename() : renaming directory across directories *** +-- Iteration 1 -- +bool(true) +bool(false) +bool(true) +-- Iteration 2 -- +bool(true) +bool(false) +bool(true) +-- Iteration 3 -- +bool(true) +bool(false) +bool(true) +Done + http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation9.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/rename_variation9.phpt diff -u /dev/null php-src/ext/standard/tests/file/rename_variation9.phpt:1.2 --- /dev/null Wed Apr 30 13:53:51 2008 +++ php-src/ext/standard/tests/file/rename_variation9.phpt Wed Apr 30 13:53:50 2008 @@ -0,0 +1,53 @@ +--TEST-- +Test rename() function: basic functionality +--FILE-- +<?php +/* Prototype: bool rename ( string $oldname, string $newname [, resource $context] ); + Description: Renames a file or directory +*/ + +echo "\n*** Testing rename() by giving stream context as third argument ***\n"; +$file_path = dirname(__FILE__); + +$context = stream_context_create(); + +// on directory +$dir_name = "$file_path/rename_variation_dir9"; +$new_dir_name = "$file_path/rename_variation_dir9_new"; + +mkdir($dir_name); + +var_dump( rename($dir_name, $new_dir_name, $context) ); +var_dump( file_exists($dir_name) ); // expecting flase +var_dump( file_exists($new_dir_name) ); // expecting true + +//on file +$src_name = "$file_path/rename_variation9.tmp"; +$dest_name = "$file_path/rename_variation9_new.tmp"; + +// create the file +$fp = fopen($src_name, "w"); +$s1 = stat($src_name); +fclose($fp); + +var_dump( rename($src_name, $dest_name, $context) ); +var_dump( file_exists($src_name) ); // expecting false +var_dump( file_exists($dest_name) ); // expecting true + +echo "Done\n"; +?> +--CLEAN-- +<?php +unlink(dirname(__FILE__)."/rename_variation9_new.tmp"); +rmdir(dirname(__FILE__)."/rename_variation_dir9_new"); +?> +--EXPECTF-- +*** Testing rename() by giving stream context as third argument *** +bool(true) +bool(false) +bool(true) +bool(true) +bool(false) +bool(true) +Done + http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_basic.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/rename_basic.phpt diff -u php-src/ext/standard/tests/file/rename_basic.phpt:1.2 php-src/ext/standard/tests/file/rename_basic.phpt:1.3 --- php-src/ext/standard/tests/file/rename_basic.phpt:1.2 Thu Jun 14 20:30:16 2007 +++ php-src/ext/standard/tests/file/rename_basic.phpt Wed Apr 30 13:53:50 2008 @@ -6,7 +6,7 @@ Description: Renames a file or directory */ -echo "*** Testing rename() for basic functions on existing file ***\n"; +echo "*** Testing rename() on non-existing file ***\n"; $file_path = dirname(__FILE__); $src_name = "$file_path/rename_basic.tmp"; $dest_name = "$file_path/rename_basic_new.tmp"; @@ -16,136 +16,30 @@ $s1 = stat($src_name); fclose($fp); -var_dump( rename($src_name, $dest_name) ); -// ensure that $dest_name didn't get created -var_dump( file_exists($src_name) ); // expecting false +var_dump( rename($src_name, $dest_name) ); // expecting true +var_dump( file_exists($src_name) ); // expecting false var_dump( file_exists($dest_name) ); // expecting true $s2 = stat("$file_path/rename_basic_new.tmp"); -// checking statistics of old and renamed file -// both should be same + +// checking statistics of old and renamed file - both should be same for ($i = 0; $i <= 12; $i++) { if ($s1[$i] != $s2[$i]) { echo "rename_basic.tmp and rename_basic_new.tmp stat differ at element $i\n"; } } -echo "\n*** Testing rename() on non-existing file ***\n"; -// try renaming a non existing file -$src_name = $file_path."/non_existent_file.tmp"; -$dest_name = $file_path."/rename_basic_new1.tmp"; -var_dump( rename($src_name, $dest_name) ); -// ensure that $dest_name didn't get created -var_dump( file_exists($src_name) ); // expecting false -var_dump( file_exists($dest_name) ); // expecting false - -// rename a existing dir to new name -echo "\n*** Testing rename() on existing directory ***\n"; -$dir_name = $file_path."/rename_basic_dir"; -mkdir($dir_name); -$new_dir_name = $file_path."/rename_basic_dir1"; -var_dump( rename($dir_name, $new_dir_name) ); -//ensure that $new_dir_name got created -var_dump( file_exists($dir_name) ); // expecting false -var_dump( file_exists($new_dir_name) ); // expecting true - -// try to rename an non_existing dir -echo "\n*** Testing rename() on non-existing directory ***\n"; -$non_existent_dir_name = $file_path."/non_existent_dir"; -$new_dir_name = "$file_path/rename_basic_dir2"; -var_dump( rename($non_existent_dir_name, $new_dir_name) ); -// ensure that $new_dir_name didn't get created -var_dump( file_exists($non_existent_dir_name) ); // expecting flase -var_dump( file_exists($new_dir_name) ); // expecting false - -echo "\n*** Testing rename() by giving stream context as third argument ***\n"; -$context = stream_context_create(); -// on directory -$dir_name = "$file_path/rename_basic_dir1"; -$new_dir_name = "$file_path/rename_basic_dir3"; -var_dump( rename($dir_name, $new_dir_name, $context) ); -// ensure that $new_dir_name got created -var_dump( file_exists($dir_name) ); // expecting flase -var_dump( file_exists($new_dir_name) ); // expecting true - -//on file -$src_name = "$file_path/rename_basic_new.tmp"; -$dest_name = "$file_path/rename_basic_new2.tmp"; -var_dump( rename($src_name, $dest_name, $context) ); -// ensure that $dest_name got created -var_dump( file_exists($src_name) ); // expecting false -var_dump( file_exists($dest_name) ); // expecting true - echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/rename_basic_new2.tmp"); -rmdir(dirname(__FILE__)."/rename_basic_dir3"); +unlink(dirname(__FILE__)."/rename_basic.tmp"); +unlink(dirname(__FILE__)."/rename_basic_new.tmp"); ?> --EXPECTF-- -*** Testing rename() for basic functions on existing file *** -bool(true) -bool(false) -bool(true) - *** Testing rename() on non-existing file *** - -Warning: rename(%s/non_existent_file.tmp,%s/rename_basic_new1.tmp): No such file or directory in %s on line %d -bool(false) -bool(false) -bool(false) - -*** Testing rename() on existing directory *** -bool(true) -bool(false) -bool(true) - -*** Testing rename() on non-existing directory *** - -Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): No such file or directory in %s on line %d -bool(false) -bool(false) -bool(false) - -*** Testing rename() by giving stream context as third argument *** -bool(true) -bool(false) -bool(true) bool(true) bool(false) bool(true) Done ---UEXPECTF-- -*** Testing rename() for basic functions on existing file *** -bool(true) -bool(false) -bool(true) - -*** Testing rename() on non-existing file *** - -Warning: rename(%s/non_existent_file.tmp,%s/rename_basic_new1.tmp): No such file or directory in %s on line %d -bool(false) -bool(false) -bool(false) - -*** Testing rename() on existing directory *** -bool(true) -bool(false) -bool(true) -*** Testing rename() on non-existing directory *** - -Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): No such file or directory in %s on line %d -bool(false) -bool(false) -bool(false) - -*** Testing rename() by giving stream context as third argument *** -bool(true) -bool(false) -bool(true) -bool(true) -bool(false) -bool(true) -Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/rename_variation-win32.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/rename_variation-win32.phpt diff -u php-src/ext/standard/tests/file/rename_variation-win32.phpt:1.2 php-src/ext/standard/tests/file/rename_variation-win32.phpt:1.3 --- php-src/ext/standard/tests/file/rename_variation-win32.phpt:1.2 Thu Jun 21 21:14:21 2007 +++ php-src/ext/standard/tests/file/rename_variation-win32.phpt Wed Apr 30 13:53:50 2008 @@ -14,291 +14,74 @@ require dirname(__FILE__).'/file.inc'; -/* creating directory */ +/* create directory */ $file_path = dirname(__FILE__); -mkdir("$file_path/rename_variation/"); +mkdir("$file_path/rename_variation"); -/* Testing rename() function on files */ -echo "*** Testing variations of rename() on files ***\n"; -$files_arr = array( +/* rename files across directories */ +echo "*** Testing rename() : rename files across directories ***\n"; +$src_filenames = array( "$file_path/rename_variation/rename_variation.tmp", + /* Testing a file trailing slash */ + "$file_path/rename_variation/rename_variation.tmp/", + /* Testing file with double slashes */ "$file_path/rename_variation//rename_variation.tmp", - "$file_path/rename_variation/r*.tmp", - - /* Testing Binary safe */ - "$file_path/rename_variation/rename_variationx000.tmp" + "$file_path//rename_variation//rename_variation.tmp", ); + $counter = 1; + /* loop through each $file and rename it to rename_variation2.tmp */ -foreach($files_arr as $file) { +foreach($src_filenames as $src_filename) { + echo "-- Iteration $counter --\n"; $fp = fopen("$file_path/rename_variation/rename_variation.tmp", "w"); fclose($fp); - echo "-- Iteration $counter --\n"; - var_dump( rename($file, "$file_path/rename_variation2.tmp") ); - $counter++; - unlink("$file_path/rename_variation2.tmp"); -} -unlink("$file_path/rename_variation/rename_variation.tmp"); -rmdir("$file_path/rename_variation/"); // deleting temp directory + $dest_filename = "$file_path/rename_variation2.tmp"; + var_dump( rename($src_filename, $dest_filename) ); -/* Testing rename() function on directories */ -echo "\n*** Testing variations of rename() on directories ***\n"; -$directories = array ( - /* Testing simple directory tree */ - "$file_path/rename_variation/", - - /* Testing a dir with trailing slash */ - "$file_path/rename_variation/", - - /* Testing dir with double trailing slashes */ - "$file_path/rename_variation//", - - /* Testing Binary safe */ - "$file_path/rename_variationx000/", - - /* Testing current directory */ - ".", - - /* Dir name as empty string */ - "", - '', - - /* Dir name as string with a space */ - " ", - ' ' -); -$counter = 1; -/* loop through each $dir and rename it to rename_variation1 */ -foreach($directories as $dir) { - mkdir("$file_path/rename_variation/"); - echo "-- Iteration $counter --\n"; - var_dump( rename($dir, "$file_path/rename_variation1/") ); + // ensure that file got renamed to new name + var_dump( file_exists($src_filename) ); // expecting false + var_dump( file_exists($dest_filename) ); // expecting true $counter++; - rmdir("$file_path/rename_variation1/"); + + // unlink the file + unlink($dest_filename); } -/* Testing rename() on non-existing file and directory as first argument */ -echo "\n*** Testing rename() with non-existing file and directory ***\n"; -// renaming a non-existing file to existing file -var_dump( rename(dirname(__FILE__)."/rename_variation123.tmp", __FILE__) ); -// renaming a non-existing directory to existing directory -var_dump( rename(dirname(__FILE__)."/rename_variation123/", dirname(__FILE__)) ); - -/* Renaming a file and directory to numeric name */ -echo "\n*** Testing rename() by renaming a file and directory to numeric name ***\n"; -$fp = fopen(dirname(__FILE__)."/rename_variation.tmp", "w"); -fclose($fp); -// renaming existing file to numeric name -var_dump( rename(dirname(__FILE__)."/rename_variation.tmp", dirname(__FILE__)."/12345.tmp") ); -unlink(dirname(__FILE__)."/12345.tmp"); -// renaming existing directory to numeric name -var_dump( rename(dirname(__FILE__)."/rename_variation/", dirname(__FILE__)."/12345/") ); - -echo "\n*** Testing rename() with miscelleneous input ***\n"; -$file_path = dirname(__FILE__); -mkdir("$file_path/rename_variation"); -$fp = fopen("$file_path/rename_variation.tmp", "w"); -fclose($fp); - -echo "\n-- Renaming file to same file name --\n"; -var_dump( rename("$file_path/rename_variation.tmp", "$file_path/rename_variation.tmp") ); - -echo "\n-- Renaming directory to same directory name --\n"; -var_dump( rename("$file_path/rename_variation/", "$file_path/rename_variation/") ); - -echo "\n-- Renaming existing file to directory name --\n"; -var_dump( rename("$file_path/rename_variation.tmp", "$file_path/rename_variation/") ); - -echo "\n-- Renaming existing directory to file name --\n"; -var_dump( rename("$file_path/rename_variation", "$file_path/rename_variation.tmp") ); +rmdir("$file_path/rename_variation"); echo "Done\n"; ?> --CLEAN-- <?php -unlink(dirname(__FILE__)."/12345.tmp"); -unlink(dirname(__FILE__)."/rename_variation.tmp"); -rmdir(dirname(__FILE__)."/rename_variation.tmp/"); -rmdir(dirname(__FILE__)."/rename_variation/"); -rmdir(dirname(__FILE__)."/12345/"); +$file_path = dirname(__FILE__); +unlink($file_path."/rename_variation_link.tmp"); +unlink($file_path."/rename_variation.tmp"); +rmdir($file_path."/rename_variation_dir"); ?> --EXPECTF-- -*** Testing variations of rename() on files *** +*** Testing rename() : rename files across directories *** -- Iteration 1 -- bool(true) --- Iteration 2 -- -bool(true) --- Iteration 3 -- -bool(true) --- Iteration 4 -- - -Warning: rename(%s,%s): No such file or directory in %s on line %d bool(false) - -Warning: unlink(%s): No such file or directory in %s on line %d - -*** Testing variations of rename() on directories *** --- Iteration 1 -- bool(true) -- Iteration 2 -- -bool(true) --- Iteration 3 -- -bool(true) --- Iteration 4 -- -Warning: rename(%s,%s): No such file or directory in %s on line %d +Warning: rename(%s/rename_variation/rename_variation.tmp/,%s/rename_variation2.tmp): No such file or directory in %s on line %d bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 5 -- - -Warning: rename(.,%s): Permission denied in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 6 -- - -Warning: rename(,%s): Permission denied in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 7 -- - -Warning: rename(,%s): Permission denied in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 8 -- - -Warning: rename( ,%s): File exists in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 9 -- - -Warning: rename( ,%s): File exists in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d - -*** Testing rename() with non-existing file and directory *** - -Warning: rename(%s,%s): No such file or directory in %s on line %d -bool(false) - -Warning: rename(%s,%s): No such file or directory in %s on line %d -bool(false) - -*** Testing rename() by renaming a file and directory to numeric name *** -bool(true) -bool(true) - -*** Testing rename() with miscelleneous input *** - --- Renaming file to same file name -- -bool(true) - --- Renaming directory to same directory name -- bool(true) - --- Renaming existing file to directory name -- - -Warning: rename(%s,%s): File exists in %s on line %d bool(false) --- Renaming existing directory to file name -- - -Warning: rename(%s,%s): File exists in %s on line %d -bool(false) -Done ---UEXPECTF-- -*** Testing variations of rename() on files *** --- Iteration 1 -- -bool(true) --- Iteration 2 -- -bool(true) +Warning: unlink(%s/rename_variation2.tmp): No such file or directory in %s on line %d -- Iteration 3 -- bool(true) --- Iteration 4 -- - -Warning: rename(%s,%s): No such file or directory in %s on line %d bool(false) - -Warning: unlink(%s): No such file or directory in %s on line %d - -*** Testing variations of rename() on directories *** --- Iteration 1 -- -bool(true) --- Iteration 2 -- -bool(true) --- Iteration 3 -- bool(true) -- Iteration 4 -- - -Warning: rename(%s,%s): No such file or directory in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 5 -- - -Warning: rename(.,%s): Permission denied in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 6 -- - -Warning: rename(,%s): Permission denied in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 7 -- - -Warning: rename(,%s): Permission denied in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 8 -- - -Warning: rename( ,%s): File exists in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d --- Iteration 9 -- - -Warning: rename( ,%s): File exists in %s on line %d -bool(false) - -Warning: rmdir(%s): No such file or directory in %s on line %d - -*** Testing rename() with non-existing file and directory *** - -Warning: rename(%s,%s): No such file or directory in %s on line %d -bool(false) - -Warning: rename(%s,%s): No such file or directory in %s on line %d -bool(false) - -*** Testing rename() by renaming a file and directory to numeric name *** -bool(true) -bool(true) - -*** Testing rename() with miscelleneous input *** - --- Renaming file to same file name -- -bool(true) - --- Renaming directory to same directory name -- bool(true) - --- Renaming existing file to directory name -- - -Warning: rename(%s,%s): File exists in %s on line %d -bool(false) - --- Renaming existing directory to file name -- - -Warning: rename(%s,%s): File exists in %s on line %d bool(false) +bool(true) Done +
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php