]> granicus.if.org Git - php/commitdiff
fix datetime tests with vc14
authorAnatol Belski <ab@php.net>
Fri, 22 May 2015 07:51:54 +0000 (09:51 +0200)
committerAnatol Belski <ab@php.net>
Sun, 24 May 2015 21:49:42 +0000 (23:49 +0200)
VC14 RC seems to support more format extensions, however some
difrerences do still persist.

14 files changed:
ext/date/tests/gmstrftime_variation11.phpt
ext/date/tests/gmstrftime_variation13.phpt
ext/date/tests/gmstrftime_variation15.phpt
ext/date/tests/gmstrftime_variation17.phpt
ext/date/tests/gmstrftime_variation19.phpt
ext/date/tests/gmstrftime_variation21.phpt
ext/date/tests/gmstrftime_variation9.phpt
ext/date/tests/strftime_variation11.phpt
ext/date/tests/strftime_variation13.phpt
ext/date/tests/strftime_variation15.phpt
ext/date/tests/strftime_variation17.phpt
ext/date/tests/strftime_variation19.phpt
ext/date/tests/strftime_variation21.phpt
ext/date/tests/strftime_variation9.phpt

index 482ff6d2d73a49f41cbe64efaf11a435ea34bc20..f90e51ec16c33cc4f63a1e2e459ebc4a9b69f53b 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test gmstrftime() function : usage variation - Checking month related formats which are not supported on Windows
+Test gmstrftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -32,6 +32,6 @@ var_dump( gmstrftime($format, $timestamp) );
 *** Testing gmstrftime() : usage variation ***
 
 -- Testing gmstrftime() function with  Abbreviated month name format %h --
-bool(false)
-bool(false)
+string(%d) "%s"
+string(3) "Aug"
 ===DONE===
index 42f33f01ead9a6c5535242679b73959eb0aece12..cccfa89d420ab41d2fc82e5e2c799c1a4a6c17fc 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test gmstrftime() function : usage variation - Checking date related formats which are not supported on Windows
+Test gmstrftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -18,7 +18,7 @@ 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");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 
 //array of values to iterate over
@@ -43,18 +43,18 @@ foreach($inputs as $key =>$value) {
 *** Testing gmstrftime() : usage variation ***
 
 --Century number--
-bool(false)
-bool(false)
+string(2) "%d"
+string(2) "20"
 
 --Month Date Year--
-bool(false)
-bool(false)
+string(%d) "%d/%d/%d"
+string(8) "08/08/08"
 
 --Year with century--
-bool(false)
-bool(false)
+string(%d) "%d"
+string(4) "2008"
 
 --Year without century--
-bool(false)
-bool(false)
+string(2) "%d"
+string(2) "08"
 ===DONE===
index c0df36478904d6dc0981813b2ea860164b5af9d7..0a32b4332292069477aee42d7290a9ca94888ba5 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test gmstrftime() function : usage variation - Checking time related formats which are not supported on Windows
+Test gmstrftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -18,7 +18,7 @@ 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");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 
 //array of values to iterate over
@@ -42,14 +42,14 @@ foreach($inputs as $key =>$value) {
 *** Testing gmstrftime() : usage variation ***
 
 --Time in a.m/p.m notation--
-bool(false)
-bool(false)
+string(%d) "%d:%d:%d %c%c"
+string(11) "08:08:08 AM"
 
 --Time in 24 hour notation--
-bool(false)
-bool(false)
+string(%d) "%d:%d"
+string(5) "08:08"
 
 --Current time %H:%M:%S format--
-bool(false)
-bool(false)
+string(%d) "%d:%d:%d"
+string(8) "08:08:08"
 ===DONE===
index e3070a514439a058349d80980a41adfe6e14ead0..5fa308f645b9c6c206cec229911261a3606c2b4e 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test gmstrftime() function : usage variation - Checking day related formats which are not supported on Windows
+Test gmstrftime() function : usage variation - Checking day related formats which was not supported on Windows before vc14
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -18,7 +18,7 @@ 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");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 
 echo "\n-- Testing gmstrftime() function with Day of the month as decimal single digit format --\n";
@@ -32,6 +32,6 @@ var_dump( gmstrftime($format, $timestamp) );
 *** Testing gmstrftime() : usage variation ***
 
 -- Testing gmstrftime() function with Day of the month as decimal single digit format --
-bool(false)
-bool(false)
+string(2) "%A%d"
+string(2) " 8"
 ===DONE===
index 3131e01ca189e5d24125b7153bfe1cd77a8f8e31..9ba714750e48e858db4d0e24d60e85327ee8cccf 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test gmstrftime() function : usage variation - Checking newline and tab formats which are not supported on Windows
+Test gmstrftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -18,7 +18,7 @@ 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");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 
 //array of values to iterate over
@@ -41,10 +41,12 @@ foreach($inputs as $key =>$value) {
 *** Testing gmstrftime() : usage variation ***
 
 --Newline character--
-bool(false)
-bool(false)
+string(1) "
+"
+string(1) "
+"
 
 --Tab character--
-bool(false)
-bool(false)
+string(1) "    "
+string(1) "    "
 ===DONE===
index 26ed157c3fef799d6273765932266f0d47d268b7..08ca2fc606a31ad4040e8d727dd46016ccd70580 100644 (file)
@@ -18,7 +18,7 @@ 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");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 
 //array of values to iterate over
@@ -42,8 +42,8 @@ foreach($inputs as $key =>$value) {
 *** Testing gmstrftime() : usage variation ***
 
 --Preferred date and time representation--
-string(%d) "%d/%d/%d %d:%d:%d"
-string(17) "08/08/08 08:08:08"
+string(%d) "%s %s %d %d:%d:%d %d"
+string(24) "Fri Aug  8 08:08:08 2008"
 
 --Preferred date representation--
 string(%d) "%d/%d/%d"
index 95b6c904f99783db2649420c3b9f623bd1d867f3..6ba33ac394e63c9cf6f8138721345a2b890d3796 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test gmstrftime() function : usage variation - Checking week related formats which are not supported on Windows
+Test gmstrftime() function : usage variation - Checking week related formats which was not supported on Windows before vc14
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -18,7 +18,7 @@ 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");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 
 //array of values to iterate over
@@ -41,10 +41,10 @@ foreach($inputs as $key =>$value) {
 *** Testing gmstrftime() : usage variation ***
 
 --The ISO 8601:1988 week number--
-bool(false)
-bool(false)
+string(%d) "%d"
+string(2) "32"
 
 --Weekday as decimal--
-bool(false)
-bool(false)
+string(1) "%d"
+string(1) "5"
 ===DONE===
index a063f0ad20d9c576a1b0a26988428de6919a196f..08d5634daad96c8dd9922a4c397faf33c9b5e1e3 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test strftime() function : usage variation - Checking month related formats which are not supported on Windows.
+Test strftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -17,7 +17,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 echo "*** Testing strftime() : usage variation ***\n";
 
 // Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
 
@@ -32,6 +32,6 @@ var_dump( strftime($format, $timestamp) );
 *** Testing strftime() : usage variation ***
 
 -- Testing strftime() function with  Abbreviated month name format %h --
-bool(false)
-bool(false)
+string(%d) "%s"
+string(3) "Aug"
 ===DONE===
index 58ad283ffd25e2cf2d846419dee9b24e12617fb6..3218558184ad39826fd4d02100b52bd016a176df 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test strftime() function : usage variation - Checking date related formats which are not supported on Windows.
+Test strftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -17,7 +17,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 echo "*** Testing strftime() : usage variation ***\n";
 
 // Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
 
@@ -43,18 +43,18 @@ foreach($inputs as $key =>$value) {
 *** Testing strftime() : usage variation ***
 
 --Century number--
-bool(false)
-bool(false)
+string(2) "20"
+string(2) "20"
 
 --Month Date Year--
-bool(false)
-bool(false)
+string(%d) "%d/%d/%d"
+string(8) "08/08/08"
 
 --Year with century--
-bool(false)
-bool(false)
+string(4) "%d"
+string(4) "2008"
 
 --Year without century--
-bool(false)
-bool(false)
+string(2) "%d"
+string(2) "08"
 ===DONE===
index 5b2946bf5d594ccb18aa30470b27592c5800736c..962afd89c564f0d84681232145013088106489ce 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test strftime() function : usage variation - Checking time related formats which are not supported on Windows.
+Test strftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -17,7 +17,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 echo "*** Testing strftime() : usage variation ***\n";
 
 // Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
 
@@ -42,14 +42,14 @@ foreach($inputs as $key =>$value) {
 *** Testing strftime() : usage variation ***
 
 --Time in a.m/p.m notation--
-bool(false)
-bool(false)
+string(%d) "%d:%d:%d %s"
+string(11) "08:08:08 AM"
 
 --Time in 24 hour notation--
-bool(false)
-bool(false)
+string(%d) "%d:%d"
+string(5) "08:08"
 
 --Current time %H:%M:%S format--
-bool(false)
-bool(false)
+string(%d) "%d:%d:%d"
+string(8) "08:08:08"
 ===DONE===
index 90b3269e835facd86af49b0bae394df6c016ec2f..66527e3436f362de7263378b748575fc371bb396 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test strftime() function : usage variation - Checking day related formats which are not supported on Windows.
+Test strftime() function : usage variation - Checking day related formats which was not supported on Windows before VC14.
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -17,7 +17,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 echo "*** Testing strftime() : usage variation ***\n";
 
 // Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
 
@@ -31,6 +31,6 @@ var_dump( strftime($format, $timestamp) );
 *** Testing strftime() : usage variation ***
 
 -- Testing strftime() function with Day of the month as decimal single digit format --
-bool(false)
-bool(false)
+string(%d) "%A%d"
+string(2) " 8"
 ===DONE===
index b41607719c10cb06bb74363fde67030e019c9ab6..f36d0a189e1bfd45f1691c1a508a1c386fec3738 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test strftime() function : usage variation - Checking newline and tab formats which are not supported on Windows.
+Test strftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -41,10 +41,12 @@ foreach($inputs as $key =>$value) {
 *** Testing strftime() : usage variation ***
 
 --Newline character--
-bool(false)
-bool(false)
+string(1) "
+"
+string(1) "
+"
 
 --Tab character--
-bool(false)
-bool(false)
+string(1) "    "
+string(1) "    "
 ===DONE===
index f6aed15eff7c741479877029952a40e8f2f7845e..735659298a2b0fef81af27123b44e5d24691e9cf 100644 (file)
@@ -17,7 +17,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 echo "*** Testing strftime() : usage variation ***\n";
 
 // Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
 
@@ -42,8 +42,8 @@ foreach($inputs as $key =>$value) {
 *** Testing strftime() : usage variation ***
 
 --Preferred date and time representation--
-string(%d) "%d/%d/%d %d:%d:%d"
-string(17) "08/08/08 08:08:08"
+string(%d) "%s %s %d %d:%d:%d %d"
+string(24) "Fri Aug  8 08:08:08 2008"
 
 --Preferred date representation--
 string(%d) "%d/%d/%d"
index 23aa92d98dadef81f11ba5f0820434f910292adb..eff030984f75cacdc91b459f5648de9a06ff4264 100644 (file)
@@ -1,5 +1,5 @@
 --TEST--
-Test strftime() function : usage variation - Checking week related formats which are not supported on Windows.
+Test strftime() function : usage variation - Checking week related formats which was not supported on Windows before VC14.
 --SKIPIF--
 <?php
 if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
@@ -17,7 +17,7 @@ if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
 echo "*** Testing strftime() : usage variation ***\n";
 
 // Initialise function arguments not being substituted (if any)
-setlocale(LC_ALL, "en_US");
+setlocale(LC_ALL, "C");
 date_default_timezone_set("Asia/Calcutta");
 $timestamp = mktime(8, 8, 8, 8, 8, 2008);
 
@@ -41,10 +41,10 @@ foreach($inputs as $key =>$value) {
 *** Testing strftime() : usage variation ***
 
 --The ISO 8601:1988 week number--
-bool(false)
-bool(false)
+string(2) "%d"
+string(2) "32"
 
 --Weekday as decimal--
-bool(false)
-bool(false)
+string(1) "%d"
+string(1) "5"
 ===DONE===