Jeff Smith : msvcrt: Add additional strftime tests.
Alexandre Julliard
julliard at winehq.org
Mon Nov 18 16:19:18 CST 2019
Module: wine
Branch: master
Commit: 959fe2fd10eaebb34a2ffe6b430b38a73b427a2b
URL: https://source.winehq.org/git/wine.git/?a=commit;h=959fe2fd10eaebb34a2ffe6b430b38a73b427a2b
Author: Jeff Smith <whydoubt at gmail.com>
Date: Mon Nov 18 01:07:27 2019 -0600
msvcrt: Add additional strftime tests.
Signed-off-by: Jeff Smith <whydoubt at gmail.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msvcrt/tests/time.c | 6 ++++++
dlls/ucrtbase/tests/misc.c | 11 +++++++++++
2 files changed, 17 insertions(+)
diff --git a/dlls/msvcrt/tests/time.c b/dlls/msvcrt/tests/time.c
index c8acd848bf..4a3d81d2dd 100644
--- a/dlls/msvcrt/tests/time.c
+++ b/dlls/msvcrt/tests/time.c
@@ -612,8 +612,14 @@ static void test_strftime(void)
{"e%#%e", "e%e", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%c", "01/01/70 00:00:00", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%c", "02/30/70 00:00:00", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
+ {"%#c", "Thursday, January 01, 1970 00:00:00", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%#c", "Thursday, February 30, 1970 00:00:00", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
{"%x", "01/01/70", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%x", "02/30/70", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
+ {"%#x", "Thursday, January 01, 1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%#x", "Thursday, February 30, 1970", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
{"%X", "00:00:00", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%X", "14:00:00", { 0, 0, 14, 1, 0, 70, 4, 0, 0 }},
{"%a", "Thu", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%A", "Thursday", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
{"%b", "Jan", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
diff --git a/dlls/ucrtbase/tests/misc.c b/dlls/ucrtbase/tests/misc.c
index fb138a0fa4..fa5f29372c 100644
--- a/dlls/ucrtbase/tests/misc.c
+++ b/dlls/ucrtbase/tests/misc.c
@@ -936,6 +936,17 @@ static void test_strftime(void)
{"%g", "72", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }},
{"%G", "1971", { 0, 0, 0, 2, 0, 72, 0, 1, 0 }},
{"%G", "1972", { 0, 0, 0, 3, 0, 72, 1, 2, 0 }},
+ {"%c", "Thu Jan 1 00:00:00 1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }, TRUE},
+ {"%c", "Thu Feb 30 00:00:00 1970", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
+ {"%#c", "Thursday, January 01, 1970 00:00:00", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%#c", "Thursday, February 30, 1970 00:00:00", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
+ {"%x", "01/01/70", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%x", "02/30/70", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
+ {"%#x", "Thursday, January 01, 1970", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%#x", "Thursday, February 30, 1970", { 0, 0, 0, 30, 1, 70, 4, 0, 0 }, TRUE},
+ {"%X", "00:00:00", { 0, 0, 0, 1, 0, 70, 4, 0, 0 }},
+ {"%X", "14:00:00", { 0, 0, 14, 1, 0, 70, 4, 0, 0 }},
+ {"%X", "23:59:60", { 60, 59, 23, 1, 0, 70, 4, 0, 0 }, TRUE},
};
const struct tm epoch = { 0, 0, 0, 1, 0, 70, 4, 0, 0 };
More information about the wine-cvs
mailing list