From 4e9118047171f4ca608612c8cd428f3bb40df715 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Mon, 5 Jul 2021 18:09:37 +0200 Subject: [PATCH] ntdll/tests: TZinfo sometimes does not get a MUI string. RtlQuery*TimeZoneInformation() should return a MUI string but there are rare cases where it does not in Windows 10 2004. Signed-off-by: Francois Gouget Signed-off-by: Alexandre Julliard --- dlls/ntdll/tests/time.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c index 90737521a4d..ee683e9a0aa 100644 --- a/dlls/ntdll/tests/time.c +++ b/dlls/ntdll/tests/time.c @@ -234,10 +234,12 @@ static void test_RtlQueryTimeZoneInformation(void) status = pRtlQueryDynamicTimeZoneInformation(&tzinfo); ok(status == STATUS_SUCCESS, "RtlQueryDynamicTimeZoneInformation failed, got %08x\n", status); - ok(tzinfo.StandardName[0] == '@', + ok(tzinfo.StandardName[0] == '@' || + broken(tzinfo.StandardName[0]), /* some win10 2004 */ "standard time zone name isn't an indirect string, got %s\n", wine_dbgstr_w(tzinfo.StandardName)); - ok(tzinfo.DaylightName[0] == '@', + ok(tzinfo.DaylightName[0] == '@' || + broken(tzinfo.DaylightName[0]), /* some win10 2004 */ "daylight time zone name isn't an indirect string, got %s\n", wine_dbgstr_w(tzinfo.DaylightName)); @@ -251,10 +253,12 @@ static void test_RtlQueryTimeZoneInformation(void) status = pRtlQueryTimeZoneInformation((RTL_TIME_ZONE_INFORMATION *)&tzinfo); ok(status == STATUS_SUCCESS, "RtlQueryTimeZoneInformation failed, got %08x\n", status); - ok(tzinfo.StandardName[0] == '@', + ok(tzinfo.StandardName[0] == '@' || + broken(tzinfo.StandardName[0]), /* some win10 2004 */ "standard time zone name isn't an indirect string, got %s\n", wine_dbgstr_w(tzinfo.StandardName)); - ok(tzinfo.DaylightName[0] == '@', + ok(tzinfo.DaylightName[0] == '@' || + broken(tzinfo.DaylightName[0]), /* some win10 2004 */ "daylight time zone name isn't an indirect string, got %s\n", wine_dbgstr_w(tzinfo.DaylightName)); @@ -262,10 +266,12 @@ static void test_RtlQueryTimeZoneInformation(void) status = pRtlQueryTimeZoneInformation((RTL_TIME_ZONE_INFORMATION *)&tzinfo); ok(status == STATUS_SUCCESS, "RtlQueryTimeZoneInformation failed, got %08x\n", status); - ok(tzinfo.StandardName[0] == '@', + ok(tzinfo.StandardName[0] == '@' || + broken(tzinfo.StandardName[0]), /* some win10 2004 */ "standard time zone name isn't an indirect string, got %s\n", wine_dbgstr_w(tzinfo.StandardName)); - ok(tzinfo.DaylightName[0] == '@', + ok(tzinfo.DaylightName[0] == '@' || + broken(tzinfo.DaylightName[0]), /* some win10 2004 */ "daylight time zone name isn't an indirect string, got %s\n", wine_dbgstr_w(tzinfo.DaylightName));