ant Tue Dec 30 17:06:50 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array rsort_variation4.phpt array_rand_variation4.phpt arsort_variation3.phpt array_slice_variation1.phpt /php-src/ext/standard/tests/file 006_error.phpt disk_total_space_variation.phpt disk_total_space_error.phpt disk_free_space_basic.phpt disk_free_space_error.phpt disk_free_space_variation.phpt disk.phpt is_dir_variation2.phpt disk_total_space_basic.phpt Log: Revert to the previous version for these tests as they were overwritten by mistake (checked on Windows but not on Linux... so the six skipped tests may not work correctly... but they should be ok and I'll watch the test results).
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/rsort_variation4.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/standard/tests/array/rsort_variation4.phpt diff -u php-src/ext/standard/tests/array/rsort_variation4.phpt:1.1.2.4 php-src/ext/standard/tests/array/rsort_variation4.phpt:1.1.2.5 --- php-src/ext/standard/tests/array/rsort_variation4.phpt:1.1.2.4 Tue Dec 2 13:37:21 2008 +++ php-src/ext/standard/tests/array/rsort_variation4.phpt Tue Dec 30 17:06:50 2008 @@ -1,5 +1,7 @@ --TEST-- Test rsort() function : usage variations - referenced variables +--INI-- +allow_call_time_pass_reference=on --FILE-- <?php /* Prototype : bool rsort(array &$array_arg [, int $sort_flags]) @@ -75,4 +77,4 @@ [2]=> &int(33) } -Done \ No newline at end of file +Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_rand_variation4.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/array/array_rand_variation4.phpt diff -u php-src/ext/standard/tests/array/array_rand_variation4.phpt:1.1.2.2 php-src/ext/standard/tests/array/array_rand_variation4.phpt:1.1.2.3 --- php-src/ext/standard/tests/array/array_rand_variation4.phpt:1.1.2.2 Tue Dec 2 13:37:19 2008 +++ php-src/ext/standard/tests/array/array_rand_variation4.phpt Tue Dec 30 17:06:50 2008 @@ -38,7 +38,7 @@ // array with special chars as keys /*6*/ array('##' => "key1", '&$r' => 'key2', '!' => "key3", '<>' =>'key4', - "NULL" => 'key5', + "NULL" => 'key5', "\n" => 'newline as key', "\t" => "tab as key", "'" => 'single quote as key', '"' => 'double quote as key', "\0" => "null char as key") ); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/arsort_variation3.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/standard/tests/array/arsort_variation3.phpt diff -u php-src/ext/standard/tests/array/arsort_variation3.phpt:1.1.2.4 php-src/ext/standard/tests/array/arsort_variation3.phpt:1.1.2.5 --- php-src/ext/standard/tests/array/arsort_variation3.phpt:1.1.2.4 Tue Dec 2 13:37:18 2008 +++ php-src/ext/standard/tests/array/arsort_variation3.phpt Tue Dec 30 17:06:50 2008 @@ -1,9 +1,5 @@ --TEST-- Test arsort() function : usage variations - sort integer/float values ---SKIPIF-- -<?php -if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only"); -?> --FILE-- <?php /* Prototype : bool arsort ( array &$array [, int $sort_flags] ) @@ -63,7 +59,7 @@ echo "Done\n"; ?> ---EXPECT-- +--EXPECTF-- *** Testing arsort() : usage variations *** -- Testing arsort() by supplying various integer/float arrays -- @@ -277,7 +273,7 @@ bool(true) array(7) { [2]=> - float(2147483648) + %s(2147483648) [1]=> int(2147483647) [6]=> @@ -287,15 +283,15 @@ [3]=> int(-2147483647) [4]=> - float(-2147483648) + %s(-2147483648) [7]=> - float(-2147483649) + %s(-2147483649) } - Sort_flag = SORT_REGULAR - bool(true) array(7) { [2]=> - float(2147483648) + %s(2147483648) [1]=> int(2147483647) [6]=> @@ -305,15 +301,15 @@ [3]=> int(-2147483647) [4]=> - float(-2147483648) + %s(-2147483648) [7]=> - float(-2147483649) + %s(-2147483649) } - Sort_flag = SORT_NUMERIC - bool(true) array(7) { [2]=> - float(2147483648) + %s(2147483648) [1]=> int(2147483647) [6]=> @@ -323,8 +319,8 @@ [3]=> int(-2147483647) [4]=> - float(-2147483648) + %s(-2147483648) [7]=> - float(-2147483649) + %s(-2147483649) } Done \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_slice_variation1.phpt?r1=1.2.2.2&r2=1.2.2.3&diff_format=u Index: php-src/ext/standard/tests/array/array_slice_variation1.phpt diff -u php-src/ext/standard/tests/array/array_slice_variation1.phpt:1.2.2.2 php-src/ext/standard/tests/array/array_slice_variation1.phpt:1.2.2.3 --- php-src/ext/standard/tests/array/array_slice_variation1.phpt:1.2.2.2 Thu Feb 14 11:15:53 2008 +++ php-src/ext/standard/tests/array/array_slice_variation1.phpt Tue Dec 30 17:06:50 2008 @@ -1,227 +1,61 @@ --TEST-- -Test array_slice() function : usage variations - Pass different data types as $input arg +Test array_slice() - Third parameter (NULL vs 0) --FILE-- <?php -/* Prototype : array array_slice(array $input, int $offset [, int $length [, bool $preserve_keys]]) - * Description: Returns elements specified by offset and length - * Source code: ext/standard/array.c - */ - -/* - * Pass different arguments as $input argument to array_slice() to test behaviour - */ - -echo "*** Testing array_slice() : usage variations ***\n"; - -// Initialise function arguments not being substituted -$offset = 2; - -//get an unset variable -$unset_var = 10; -unset ($unset_var); - -// get a class -class classA -{ - public function __toString() { - return "Class A object"; - } -} - -// heredoc string -$heredoc = <<<EOT -hello world -EOT; - -// get a resource variable -$fp = fopen(__FILE__, "r"); - -// unexpected values to be passed to $input argument -$inputs = array( - - // int data -/*1*/ 0, - 1, - 12345, - -2345, - - // float data -/*5*/ 10.5, - -10.5, - 12.3456789000e10, - 12.3456789000E-10, - .5, - - // null data -/*10*/ NULL, - null, - - // boolean data -/*12*/ true, - false, - TRUE, - FALSE, - - // empty data -/*16*/ "", - '', - array(), - - // string data -/*19*/ "string", - 'string', - $heredoc, - - // object data -/*22*/ new classA(), - - // undefined data -/*23*/ @$undefined_var, - - // unset data -/*24*/ @$unset_var, - - // resource variable -/*25*/ $fp -); - -// loop through each element of $inputs to check the behavior of array_slice() -$iterator = 1; -foreach($inputs as $input) { - echo "\n-- Iteration $iterator --\n"; - var_dump( array_slice($input, $offset) ); - $iterator++; -}; -fclose($fp); +var_dump(array_slice(range(1, 3), 0, NULL, 1)); +var_dump(array_slice(range(1, 3), 0, 0, 1)); +var_dump(array_slice(range(1, 3), 0, NULL)); +var_dump(array_slice(range(1, 3), 0, 0)); + +var_dump(array_slice(range(1, 3), -1, 0)); +var_dump(array_slice(range(1, 3), -1, 0, 1)); +var_dump(array_slice(range(1, 3), -1, NULL)); +var_dump(array_slice(range(1, 3), -1, NULL, 1)); -echo "Done"; -?> - ---EXPECTF-- -*** Testing array_slice() : usage variations *** - --- Iteration 1 -- - -Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d -NULL - --- Iteration 2 -- - -Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d -NULL - --- Iteration 3 -- - -Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d -NULL - --- Iteration 4 -- - -Warning: array_slice() expects parameter 1 to be array, integer given in %s on line %d -NULL - --- Iteration 5 -- - -Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d -NULL - --- Iteration 6 -- - -Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d -NULL - --- Iteration 7 -- - -Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d -NULL - --- Iteration 8 -- - -Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d -NULL - --- Iteration 9 -- - -Warning: array_slice() expects parameter 1 to be array, double given in %s on line %d -NULL - --- Iteration 10 -- - -Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 11 -- - -Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 12 -- - -Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d -NULL - --- Iteration 13 -- - -Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d -NULL - --- Iteration 14 -- - -Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d -NULL - --- Iteration 15 -- - -Warning: array_slice() expects parameter 1 to be array, boolean given in %s on line %d -NULL --- Iteration 16 -- +$a = 'foo'; +var_dump(array_slice(range(1, 3), 0, $a)); +var_dump(array_slice(range(1, 3), 0, $a)); +var_dump($a); -Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 17 -- - -Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d -NULL +?> --- Iteration 18 -- +--EXPECTF-- +array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} array(0) { } - --- Iteration 19 -- - -Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 20 -- - -Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 21 -- - -Warning: array_slice() expects parameter 1 to be array, string given in %s on line %d -NULL - --- Iteration 22 -- - -Warning: array_slice() expects parameter 1 to be array, object given in %s on line %d -NULL - --- Iteration 23 -- - -Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 24 -- - -Warning: array_slice() expects parameter 1 to be array, null given in %s on line %d -NULL - --- Iteration 25 -- - -Warning: array_slice() expects parameter 1 to be array, resource given in %s on line %d -NULL -Done \ No newline at end of file +array(3) { + [0]=> + int(1) + [1]=> + int(2) + [2]=> + int(3) +} +array(0) { +} +array(0) { +} +array(0) { +} +array(1) { + [0]=> + int(3) +} +array(1) { + [2]=> + int(3) +} +array(0) { +} +array(0) { +} +string(3) "foo" http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/006_error.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u Index: php-src/ext/standard/tests/file/006_error.phpt diff -u php-src/ext/standard/tests/file/006_error.phpt:1.1.2.5 php-src/ext/standard/tests/file/006_error.phpt:1.1.2.6 --- php-src/ext/standard/tests/file/006_error.phpt:1.1.2.5 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/006_error.phpt Tue Dec 30 17:06:50 2008 @@ -11,7 +11,7 @@ fclose($fp); if(fileowner($filename) == 0) { unlink ($filename); - die('skip...cannot be run as root\n'); + die('skip cannot be run as root'); } unlink($filename); @@ -68,18 +68,18 @@ --EXPECTF-- *** Testing error conditions for fileperms(), chmod() *** -Warning: chmod(): %s +Warning: chmod(): %s in %s on line %d bool(false) -%d +100%d44 -Warning: chmod(): %s +Warning: chmod(): %s in %s on line %d bool(false) -%d +40755 -Warning: chmod(): %s +Warning: chmod(): No such file or directory in %s on line %d bool(false) -Warning: fileperms(): %s +Warning: fileperms(): stat failed for /no/such/file/dir in %s on line %d bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_variation.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/tests/file/disk_total_space_variation.phpt diff -u php-src/ext/standard/tests/file/disk_total_space_variation.phpt:1.1.2.3 php-src/ext/standard/tests/file/disk_total_space_variation.phpt:1.1.2.4 --- php-src/ext/standard/tests/file/disk_total_space_variation.phpt:1.1.2.3 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/disk_total_space_variation.phpt Tue Dec 30 17:06:50 2008 @@ -63,46 +63,46 @@ ?> --EXPECTF-- *** Testing with a directory *** -float(%f) +float(%d) Testing for the return type *** bool(true) *** Testing disk_total_space() function with different directory combinations *** -- Iteration 1 -- -float(%f) +float(%d) -- Iteration 2 -- -float(%f) +float(%d) -- Iteration 3 -- -float(%f) +float(%d) -- Iteration 4 -- -float(%f) +float(%d) -- Iteration 5 -- -float(%f) +float(%d) -- Iteration 6 -- -float(%f) +float(%d) -- Iteration 7 -- -float(%f) +float(%d) -- Iteration 8 -- -float(%f) +float(%d) -- Iteration 9 -- -float(%f) +float(%d) -- Iteration 10 -- -float(%f) +float(%d) -- Iteration 11 -- -float(%f) +float(%d) -- Iteration 12 -- -float(%f) +float(%d) --- Done --- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_error.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/file/disk_total_space_error.phpt diff -u php-src/ext/standard/tests/file/disk_total_space_error.phpt:1.1.2.2 php-src/ext/standard/tests/file/disk_total_space_error.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/disk_total_space_error.phpt:1.1.2.2 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/disk_total_space_error.phpt Tue Dec 30 17:06:50 2008 @@ -46,6 +46,6 @@ Warning: disk_total_space(): No such file or directory in %s on line %d bool(false) -float(%f) +float(%d) --- Done --- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_basic.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_basic.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.4 php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.5 --- php-src/ext/standard/tests/file/disk_free_space_basic.phpt:1.1.2.4 Tue Nov 25 11:31:24 2008 +++ php-src/ext/standard/tests/file/disk_free_space_basic.phpt Tue Dec 30 17:06:50 2008 @@ -50,15 +50,15 @@ --EXPECTF-- *** Testing with existing directory *** -float(%f) -float(%f) +float(%d) +float(%d) *** Testing with newly created directory *** Free Space before writing to a file -float(%f) +float(%d) Free Space after writing to a file -float(%f) +float(%d) Free Space Value Is Correct http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_error.phpt?r1=1.1.2.2&r2=1.1.2.3&diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_error.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.1.2.2 php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.1.2.3 --- php-src/ext/standard/tests/file/disk_free_space_error.phpt:1.1.2.2 Tue Nov 25 11:31:26 2008 +++ php-src/ext/standard/tests/file/disk_free_space_error.phpt Tue Dec 30 17:06:50 2008 @@ -55,12 +55,12 @@ Warning: diskfreespace() expects exactly 1 parameter, 2 given in %s on line %d NULL -Warning: disk_free_space(): %s in %s on line %d +Warning: disk_free_space(): No such file or directory in %s on line %d bool(false) -Warning: diskfreespace(): %s in %s on line %d +Warning: diskfreespace(): No such file or directory in %s on line %d bool(false) -float(%f) -float(%f) +float(%d) +float(%d) -- Done -- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_free_space_variation.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/tests/file/disk_free_space_variation.phpt diff -u php-src/ext/standard/tests/file/disk_free_space_variation.phpt:1.1.2.3 php-src/ext/standard/tests/file/disk_free_space_variation.phpt:1.1.2.4 --- php-src/ext/standard/tests/file/disk_free_space_variation.phpt:1.1.2.3 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/disk_free_space_variation.phpt Tue Dec 30 17:06:50 2008 @@ -65,59 +65,59 @@ --EXPECTF-- *** Testing disk_free_space() function with a directory *** -float(%f) -float(%f) +float(%d) +float(%d) *** Testing for the return type *** bool(true) *** Testing disk_free_space() function with different styles of file and directory *** -- Iteration 1 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 2 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 3 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 4 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 5 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 6 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 7 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 8 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 9 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 10 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 11 -- -float(%f) -float(%f) +float(%d) +float(%d) -- Iteration 12 -- -float(%f) -float(%f) +float(%d) +float(%d) --- Done --- http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk.phpt?r1=1.1.2.5&r2=1.1.2.6&diff_format=u Index: php-src/ext/standard/tests/file/disk.phpt diff -u php-src/ext/standard/tests/file/disk.phpt:1.1.2.5 php-src/ext/standard/tests/file/disk.phpt:1.1.2.6 --- php-src/ext/standard/tests/file/disk.phpt:1.1.2.5 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/disk.phpt Tue Dec 30 17:06:50 2008 @@ -37,8 +37,8 @@ Warning: disk_total_space(): No such file or directory in %s on line %d bool(false) -float(%f) -float(%f) +float(%d) +float(%d) Warning: disk_free_space(): No such file or directory in %s on line %d bool(false) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_dir_variation2.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u Index: php-src/ext/standard/tests/file/is_dir_variation2.phpt diff -u php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.1.2.4 php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.1.2.5 --- php-src/ext/standard/tests/file/is_dir_variation2.phpt:1.1.2.4 Tue Nov 25 11:31:25 2008 +++ php-src/ext/standard/tests/file/is_dir_variation2.phpt Tue Dec 30 17:06:50 2008 @@ -70,7 +70,7 @@ -- With symlink -- bool(true) -- With hardlink -- -Warning: link(): %s +Warning: link(): %s in %s on line %d bool(false) *** Testing is_dir() with file and links to a file *** http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/disk_total_space_basic.phpt?r1=1.1.2.3&r2=1.1.2.4&diff_format=u Index: php-src/ext/standard/tests/file/disk_total_space_basic.phpt diff -u php-src/ext/standard/tests/file/disk_total_space_basic.phpt:1.1.2.3 php-src/ext/standard/tests/file/disk_total_space_basic.phpt:1.1.2.4 --- php-src/ext/standard/tests/file/disk_total_space_basic.phpt:1.1.2.3 Tue Nov 25 11:31:24 2008 +++ php-src/ext/standard/tests/file/disk_total_space_basic.phpt Tue Dec 30 17:06:50 2008 @@ -38,11 +38,11 @@ --EXPECTF-- *** Testing with existing directory *** -float(%f) +float(%d) *** Testing with newly created directory *** -float(%f) +float(%d) Total Space after writing to a file -float(%f) +float(%d) --- Done ---
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php