diff options
author | Stanislav Malyshev <stas@php.net> | 2011-08-31 07:10:17 +0000 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2011-08-31 07:10:17 +0000 |
commit | 25031cd387913bcd759fbf340df57194007a8114 (patch) | |
tree | 2e6a78f2fe1ff41e847aeb553199e01a565acd1b | |
parent | 6690258734dec66a41ba986cbd5e58f2c8ac2506 (diff) | |
download | php-git-25031cd387913bcd759fbf340df57194007a8114.tar.gz |
test fixes on Darwin
-rw-r--r-- | ext/date/tests/bug33532.phpt | 4 | ||||
-rw-r--r-- | ext/date/tests/gmstrftime_variation22.phpt | 13 | ||||
-rw-r--r-- | ext/date/tests/strftime_variation22.phpt | 13 | ||||
-rw-r--r-- | ext/standard/tests/math/bug45712.phpt | 2 | ||||
-rw-r--r-- | ext/standard/tests/strings/nl_langinfo_variation1.phpt | 104 | ||||
-rw-r--r-- | ext/standard/tests/strings/strtolower.phpt | bin | 5049 -> 3889 bytes | |||
-rw-r--r-- | ext/standard/tests/strings/strtoupper1.phpt | bin | 5060 -> 3900 bytes |
7 files changed, 34 insertions, 102 deletions
diff --git a/ext/date/tests/bug33532.phpt b/ext/date/tests/bug33532.phpt index 286ceb4cec..5c88e73acd 100644 --- a/ext/date/tests/bug33532.phpt +++ b/ext/date/tests/bug33532.phpt @@ -3,6 +3,9 @@ Bug #33532 (Different output for strftime() and date()) --INI-- error_reporting=2047 date.timezone=UTC +--SKIPIF-- +<?php +if(PHP_OS == 'Darwin') die("skip strftime depends on TZ on Darwin"); --FILE-- <?php @@ -18,6 +21,7 @@ print "datestr " . date ("H:i:s A F j Y T", $tStamp) . "\n"; print "\nSetting TZ\n"; date_default_timezone_set('Australia/Sydney'); +putenv("TZ=Australia/Sydney"); $input = "10:00:00 AM July 1 2005"; print "input " . $input . "\n"; $tStamp = strtotime($input); diff --git a/ext/date/tests/gmstrftime_variation22.phpt b/ext/date/tests/gmstrftime_variation22.phpt index 198941871c..d9abdce17a 100644 --- a/ext/date/tests/gmstrftime_variation22.phpt +++ b/ext/date/tests/gmstrftime_variation22.phpt @@ -5,8 +5,8 @@ Test gmstrftime() function : usage variation - Checking Preferred date and time if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { die("skip Test is not valid for Windows"); } -if (!setlocale(LC_ALL, "en_US.utf8", "en_US")) { - die("skip Locale en_US or en_US.utf8 is required to run this test"); +if (!setlocale(LC_TIME, "POSIX")) { + die("skip Locale POSIX is required to run this test"); } ?> --FILE-- @@ -21,7 +21,8 @@ echo "*** Testing gmstrftime() : usage variation ***\n"; // Initialise function arguments not being substituted (if any) $timestamp = gmmktime(8, 8, 8, 8, 8, 2008); -setlocale(LC_ALL, "en_US.utf8", "en_US"); +setlocale(LC_TIME, "POSIX"); +putenv("LC_TIME=POSIX"); date_default_timezone_set("Asia/Calcutta"); //array of values to iterate over @@ -46,13 +47,13 @@ foreach($inputs as $key =>$value) { --Preferred date and time representation-- string(2) "%c" -string(31) "Fri 08 Aug 2008 08:08:08 AM GMT" +string(24) "Fri Aug 8 08:08:08 2008" --Preferred date representation-- string(2) "%x" -string(10) "08/08/2008" +string(8) "08/08/08" --Preferred time representation-- string(2) "%X" -string(11) "08:08:08 AM" +string(8) "08:08:08" ===DONE=== diff --git a/ext/date/tests/strftime_variation22.phpt b/ext/date/tests/strftime_variation22.phpt index 151a7d2067..7b72ca51e1 100644 --- a/ext/date/tests/strftime_variation22.phpt +++ b/ext/date/tests/strftime_variation22.phpt @@ -5,8 +5,8 @@ Test strftime() function : usage variation - Checking Preferred date and time re if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { die("skip Test is not valid for Windows"); } -if(!setlocale(LC_ALL, "en_US.utf8", "en_US")) { - die("skip Locale en_US.utf8 or en_US is needed by test and is not available"); +if(!setlocale(LC_ALL, "POSIX")) { + die("skip Locale POSIX is needed by test and is not available"); } ?> --FILE-- @@ -20,7 +20,8 @@ if(!setlocale(LC_ALL, "en_US.utf8", "en_US")) { echo "*** Testing strftime() : usage variation ***\n"; // Initialise function arguments not being substituted (if any) -setlocale(LC_ALL, "en_US.utf8", "en_US"); +setlocale(LC_ALL, "POSIX"); +putenv("LC_ALL=POSIX"); date_default_timezone_set("Asia/Calcutta"); $timestamp = mktime(8, 8, 8, 8, 8, 2008); @@ -46,13 +47,13 @@ foreach($inputs as $key =>$value) { --Preferred date and time representation-- string(2) "%c" -string(31) "Fri 08 Aug 2008 08:08:08 AM IST" +string(24) "Fri Aug 8 08:08:08 2008" --Preferred date representation-- string(2) "%x" -string(10) "08/08/2008" +string(8) "08/08/08" --Preferred time representation-- string(2) "%X" -string(11) "08:08:08 AM" +string(8) "08:08:08" ===DONE=== diff --git a/ext/standard/tests/math/bug45712.phpt b/ext/standard/tests/math/bug45712.phpt index 3ebc94c92e..e10d0e7ec3 100644 --- a/ext/standard/tests/math/bug45712.phpt +++ b/ext/standard/tests/math/bug45712.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #45712 (NaN/INF comparison) +--XFAIL-- +Bug 45712 not fixed yet. --FILE-- <?php diff --git a/ext/standard/tests/strings/nl_langinfo_variation1.phpt b/ext/standard/tests/strings/nl_langinfo_variation1.phpt index 41844697f1..98edb1ba1c 100644 --- a/ext/standard/tests/strings/nl_langinfo_variation1.phpt +++ b/ext/standard/tests/strings/nl_langinfo_variation1.phpt @@ -34,46 +34,22 @@ $file_handle = fopen(__FILE__, "r"); // array with different values for $input $items = array ( - // integer values -/*1*/ 0, - 10, - 2147483647, +/*1*/ 2147483647, -2147483648, + -20, - // float values -/*5*/ 10.5, - 20.3, - -20.5, - 10.1234567e5, - - // array values -/*9*/ array(), + // array values +/*4*/ array(), array(0), array(1, 2), - // boolean values -/*12*/ true, - false, - TRUE, - FALSE, - - // null vlaues -/*16*/ NULL, - null, - // objects -/*18*/ new sample(), +/*7*/ new sample(), // resource -/*19*/ $file_handle, - - // undefined variable -/*20*/ @$undefined_var, - - // unset variable -/*21*/ @$unset_var -); +/*8*/ $file_handle, + ); //defining '$input' argument $input = "Test string"; @@ -95,86 +71,34 @@ setlocale(LC_ALL, $original); *** Testing nl_langinfo() : with unexpected inputs for 'item' argument *** -- Iteration 1 -- -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) --- Iteration 2 -- - -Warning: nl_langinfo(): Item '10' is not valid in %s on line %d -bool(false) --- Iteration 3 -- - Warning: nl_langinfo(): Item '2147483647' is not valid in %s on line %d bool(false) --- Iteration 4 -- +-- Iteration 2 -- Warning: nl_langinfo(): Item '-2147483648' is not valid in %s on line %d bool(false) --- Iteration 5 -- - -Warning: nl_langinfo(): Item '10' is not valid in %s on line %d -bool(false) --- Iteration 6 -- - -Warning: nl_langinfo(): Item '20' is not valid in %s on line %d -bool(false) --- Iteration 7 -- +-- Iteration 3 -- Warning: nl_langinfo(): Item '-20' is not valid in %s on line %d bool(false) --- Iteration 8 -- - -Warning: nl_langinfo(): Item '1012345' is not valid in %s on line %d -bool(false) --- Iteration 9 -- +-- Iteration 4 -- Warning: nl_langinfo() expects parameter 1 to be long, array given in %s on line %d NULL --- Iteration 10 -- +-- Iteration 5 -- Warning: nl_langinfo() expects parameter 1 to be long, array given in %s on line %d NULL --- Iteration 11 -- +-- Iteration 6 -- Warning: nl_langinfo() expects parameter 1 to be long, array given in %s on line %d NULL --- Iteration 12 -- - -Warning: nl_langinfo(): Item '1' is not valid in %s on line %d -bool(false) --- Iteration 13 -- - -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) --- Iteration 14 -- - -Warning: nl_langinfo(): Item '1' is not valid in %s on line %d -bool(false) --- Iteration 15 -- - -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) --- Iteration 16 -- - -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) --- Iteration 17 -- - -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) --- Iteration 18 -- +-- Iteration 7 -- Warning: nl_langinfo() expects parameter 1 to be long, object given in %s on line %d NULL --- Iteration 19 -- +-- Iteration 8 -- Warning: nl_langinfo() expects parameter 1 to be long, resource given in %s on line %d NULL --- Iteration 20 -- - -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) --- Iteration 21 -- - -Warning: nl_langinfo(): Item '0' is not valid in %s on line %d -bool(false) ===DONE=== diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt Binary files differindex f498a95f79..166b5ccc67 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt Binary files differindex 2890c02ccd..b83a8a3a5d 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt |