summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-05-22 09:51:54 +0200
committerAnatol Belski <ab@php.net>2015-05-24 23:49:42 +0200
commitd28ab1cba38812027f194a3e22f6abf8193fd09d (patch)
treea70bda81129b8bf8fe405cac153a694a882b665a
parent977055343709e711428ec88883019ece5119f684 (diff)
downloadphp-git-d28ab1cba38812027f194a3e22f6abf8193fd09d.tar.gz
fix datetime tests with vc14
VC14 RC seems to support more format extensions, however some difrerences do still persist.
-rw-r--r--ext/date/tests/gmstrftime_variation11.phpt6
-rw-r--r--ext/date/tests/gmstrftime_variation13.phpt20
-rw-r--r--ext/date/tests/gmstrftime_variation15.phpt16
-rw-r--r--ext/date/tests/gmstrftime_variation17.phpt8
-rw-r--r--ext/date/tests/gmstrftime_variation19.phpt14
-rw-r--r--ext/date/tests/gmstrftime_variation21.phpt6
-rw-r--r--ext/date/tests/gmstrftime_variation9.phpt12
-rw-r--r--ext/date/tests/strftime_variation11.phpt8
-rw-r--r--ext/date/tests/strftime_variation13.phpt20
-rw-r--r--ext/date/tests/strftime_variation15.phpt16
-rw-r--r--ext/date/tests/strftime_variation17.phpt8
-rw-r--r--ext/date/tests/strftime_variation19.phpt12
-rw-r--r--ext/date/tests/strftime_variation21.phpt6
-rw-r--r--ext/date/tests/strftime_variation9.phpt12
14 files changed, 84 insertions, 80 deletions
diff --git a/ext/date/tests/gmstrftime_variation11.phpt b/ext/date/tests/gmstrftime_variation11.phpt
index 482ff6d2d7..f90e51ec16 100644
--- a/ext/date/tests/gmstrftime_variation11.phpt
+++ b/ext/date/tests/gmstrftime_variation11.phpt
@@ -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===
diff --git a/ext/date/tests/gmstrftime_variation13.phpt b/ext/date/tests/gmstrftime_variation13.phpt
index 42f33f01ea..cccfa89d42 100644
--- a/ext/date/tests/gmstrftime_variation13.phpt
+++ b/ext/date/tests/gmstrftime_variation13.phpt
@@ -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===
diff --git a/ext/date/tests/gmstrftime_variation15.phpt b/ext/date/tests/gmstrftime_variation15.phpt
index c0df364789..0a32b43322 100644
--- a/ext/date/tests/gmstrftime_variation15.phpt
+++ b/ext/date/tests/gmstrftime_variation15.phpt
@@ -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===
diff --git a/ext/date/tests/gmstrftime_variation17.phpt b/ext/date/tests/gmstrftime_variation17.phpt
index e3070a5144..5fa308f645 100644
--- a/ext/date/tests/gmstrftime_variation17.phpt
+++ b/ext/date/tests/gmstrftime_variation17.phpt
@@ -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===
diff --git a/ext/date/tests/gmstrftime_variation19.phpt b/ext/date/tests/gmstrftime_variation19.phpt
index 3131e01ca1..9ba714750e 100644
--- a/ext/date/tests/gmstrftime_variation19.phpt
+++ b/ext/date/tests/gmstrftime_variation19.phpt
@@ -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===
diff --git a/ext/date/tests/gmstrftime_variation21.phpt b/ext/date/tests/gmstrftime_variation21.phpt
index 26ed157c3f..08ca2fc606 100644
--- a/ext/date/tests/gmstrftime_variation21.phpt
+++ b/ext/date/tests/gmstrftime_variation21.phpt
@@ -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"
diff --git a/ext/date/tests/gmstrftime_variation9.phpt b/ext/date/tests/gmstrftime_variation9.phpt
index 95b6c904f9..6ba33ac394 100644
--- a/ext/date/tests/gmstrftime_variation9.phpt
+++ b/ext/date/tests/gmstrftime_variation9.phpt
@@ -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===
diff --git a/ext/date/tests/strftime_variation11.phpt b/ext/date/tests/strftime_variation11.phpt
index a063f0ad20..08d5634daa 100644
--- a/ext/date/tests/strftime_variation11.phpt
+++ b/ext/date/tests/strftime_variation11.phpt
@@ -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===
diff --git a/ext/date/tests/strftime_variation13.phpt b/ext/date/tests/strftime_variation13.phpt
index 58ad283ffd..3218558184 100644
--- a/ext/date/tests/strftime_variation13.phpt
+++ b/ext/date/tests/strftime_variation13.phpt
@@ -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===
diff --git a/ext/date/tests/strftime_variation15.phpt b/ext/date/tests/strftime_variation15.phpt
index 5b2946bf5d..962afd89c5 100644
--- a/ext/date/tests/strftime_variation15.phpt
+++ b/ext/date/tests/strftime_variation15.phpt
@@ -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===
diff --git a/ext/date/tests/strftime_variation17.phpt b/ext/date/tests/strftime_variation17.phpt
index 90b3269e83..66527e3436 100644
--- a/ext/date/tests/strftime_variation17.phpt
+++ b/ext/date/tests/strftime_variation17.phpt
@@ -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===
diff --git a/ext/date/tests/strftime_variation19.phpt b/ext/date/tests/strftime_variation19.phpt
index b41607719c..f36d0a189e 100644
--- a/ext/date/tests/strftime_variation19.phpt
+++ b/ext/date/tests/strftime_variation19.phpt
@@ -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===
diff --git a/ext/date/tests/strftime_variation21.phpt b/ext/date/tests/strftime_variation21.phpt
index f6aed15eff..735659298a 100644
--- a/ext/date/tests/strftime_variation21.phpt
+++ b/ext/date/tests/strftime_variation21.phpt
@@ -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"
diff --git a/ext/date/tests/strftime_variation9.phpt b/ext/date/tests/strftime_variation9.phpt
index 23aa92d98d..eff030984f 100644
--- a/ext/date/tests/strftime_variation9.phpt
+++ b/ext/date/tests/strftime_variation9.phpt
@@ -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===