From: Ant Phillips Date: Tue, 30 Dec 2008 17:06:50 +0000 (+0000) Subject: Revert to the previous version for these tests as they were overwritten by mistake... X-Git-Tag: php-5.2.9RC1~187 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=aa90a2d3e069ff526d66f9f7cbebe041d29f19aa;p=php 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). --- diff --git a/ext/standard/tests/array/array_rand_variation4.phpt b/ext/standard/tests/array/array_rand_variation4.phpt index be4302d33f..9eb7edcd59 100644 --- a/ext/standard/tests/array/array_rand_variation4.phpt +++ b/ext/standard/tests/array/array_rand_variation4.phpt @@ -38,7 +38,7 @@ $asso_arrays = array( // 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") ); diff --git a/ext/standard/tests/array/array_slice_variation1.phpt b/ext/standard/tests/array/array_slice_variation1.phpt index 4c7a148c88..daed1d84fc 100644 --- a/ext/standard/tests/array/array_slice_variation1.phpt +++ b/ext/standard/tests/array/array_slice_variation1.phpt @@ -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-- --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 -- - -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 -- +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" diff --git a/ext/standard/tests/array/arsort_variation3.phpt b/ext/standard/tests/array/arsort_variation3.phpt index eab3b45f62..609155ca73 100644 --- a/ext/standard/tests/array/arsort_variation3.phpt +++ b/ext/standard/tests/array/arsort_variation3.phpt @@ -1,9 +1,5 @@ --TEST-- Test arsort() function : usage variations - sort integer/float values ---SKIPIF-- - --FILE-- ---EXPECT-- +--EXPECTF-- *** Testing arsort() : usage variations *** -- Testing arsort() by supplying various integer/float arrays -- @@ -277,7 +273,7 @@ array(11) { bool(true) array(7) { [2]=> - float(2147483648) + %s(2147483648) [1]=> int(2147483647) [6]=> @@ -287,15 +283,15 @@ array(7) { [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 @@ array(7) { [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 @@ array(7) { [3]=> int(-2147483647) [4]=> - float(-2147483648) + %s(-2147483648) [7]=> - float(-2147483649) + %s(-2147483649) } Done \ No newline at end of file diff --git a/ext/standard/tests/array/rsort_variation4.phpt b/ext/standard/tests/array/rsort_variation4.phpt index abbed35bad..4cab1a9334 100644 --- a/ext/standard/tests/array/rsort_variation4.phpt +++ b/ext/standard/tests/array/rsort_variation4.phpt @@ -1,5 +1,7 @@ --TEST-- Test rsort() function : usage variations - referenced variables +--INI-- +allow_call_time_pass_reference=on --FILE-- &int(33) } -Done \ No newline at end of file +Done diff --git a/ext/standard/tests/file/006_error.phpt b/ext/standard/tests/file/006_error.phpt index 3cbacd5639..ac95ca5700 100644 --- a/ext/standard/tests/file/006_error.phpt +++ b/ext/standard/tests/file/006_error.phpt @@ -11,7 +11,7 @@ $fp = fopen($filename, 'w'); 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 @@ unlink( dirname(__FILE__)."/006_error.tmp"); --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) diff --git a/ext/standard/tests/file/disk.phpt b/ext/standard/tests/file/disk.phpt index e1a74fc984..6eef4b4a77 100644 --- a/ext/standard/tests/file/disk.phpt +++ b/ext/standard/tests/file/disk.phpt @@ -37,8 +37,8 @@ bool(false) 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) diff --git a/ext/standard/tests/file/disk_free_space_basic.phpt b/ext/standard/tests/file/disk_free_space_basic.phpt index cae37bad59..d9412198a0 100644 --- a/ext/standard/tests/file/disk_free_space_basic.phpt +++ b/ext/standard/tests/file/disk_free_space_basic.phpt @@ -50,15 +50,15 @@ rmdir($file_path.$dir); --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 diff --git a/ext/standard/tests/file/disk_free_space_error.phpt b/ext/standard/tests/file/disk_free_space_error.phpt index 945b7b9c84..ee5abc8e8a 100644 --- a/ext/standard/tests/file/disk_free_space_error.phpt +++ b/ext/standard/tests/file/disk_free_space_error.phpt @@ -55,12 +55,12 @@ NULL 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 -- diff --git a/ext/standard/tests/file/disk_free_space_variation.phpt b/ext/standard/tests/file/disk_free_space_variation.phpt index 01fa183735..ee72eea465 100644 --- a/ext/standard/tests/file/disk_free_space_variation.phpt +++ b/ext/standard/tests/file/disk_free_space_variation.phpt @@ -65,59 +65,59 @@ rmdir($file_path); --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 --- diff --git a/ext/standard/tests/file/disk_total_space_basic.phpt b/ext/standard/tests/file/disk_total_space_basic.phpt index 8f3a2f21c3..caf7452e41 100644 --- a/ext/standard/tests/file/disk_total_space_basic.phpt +++ b/ext/standard/tests/file/disk_total_space_basic.phpt @@ -38,11 +38,11 @@ rmdir($file_path."/disk_total_space"); --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 --- diff --git a/ext/standard/tests/file/disk_total_space_error.phpt b/ext/standard/tests/file/disk_total_space_error.phpt index 196028007e..4050997e8e 100644 --- a/ext/standard/tests/file/disk_total_space_error.phpt +++ b/ext/standard/tests/file/disk_total_space_error.phpt @@ -46,6 +46,6 @@ NULL Warning: disk_total_space(): No such file or directory in %s on line %d bool(false) -float(%f) +float(%d) --- Done --- diff --git a/ext/standard/tests/file/disk_total_space_variation.phpt b/ext/standard/tests/file/disk_total_space_variation.phpt index 6cd96cd872..f722883a3c 100644 --- a/ext/standard/tests/file/disk_total_space_variation.phpt +++ b/ext/standard/tests/file/disk_total_space_variation.phpt @@ -63,46 +63,46 @@ rmdir($file_path.$dir); ?> --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 --- diff --git a/ext/standard/tests/file/is_dir_variation2.phpt b/ext/standard/tests/file/is_dir_variation2.phpt index 8817256793..70fe94e44f 100644 --- a/ext/standard/tests/file/is_dir_variation2.phpt +++ b/ext/standard/tests/file/is_dir_variation2.phpt @@ -70,7 +70,7 @@ bool(true) -- 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 ***