advapi32/tests: Don't check the display name if not in an English locale.
Service display names are often translated. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e9a1ff1130
commit
58ff2a0a88
|
@ -2678,6 +2678,26 @@ static void test_refcount(void)
|
||||||
CloseServiceHandle(scm_handle);
|
CloseServiceHandle(scm_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static BOOL is_lang_english(void)
|
||||||
|
{
|
||||||
|
static HMODULE hkernel32 = NULL;
|
||||||
|
static LANGID (WINAPI *pGetThreadUILanguage)(void) = NULL;
|
||||||
|
static LANGID (WINAPI *pGetUserDefaultUILanguage)(void) = NULL;
|
||||||
|
|
||||||
|
if (!hkernel32)
|
||||||
|
{
|
||||||
|
hkernel32 = GetModuleHandleA("kernel32.dll");
|
||||||
|
pGetThreadUILanguage = (void*)GetProcAddress(hkernel32, "GetThreadUILanguage");
|
||||||
|
pGetUserDefaultUILanguage = (void*)GetProcAddress(hkernel32, "GetUserDefaultUILanguage");
|
||||||
|
}
|
||||||
|
if (pGetThreadUILanguage)
|
||||||
|
return PRIMARYLANGID(pGetThreadUILanguage()) == LANG_ENGLISH;
|
||||||
|
if (pGetUserDefaultUILanguage)
|
||||||
|
return PRIMARYLANGID(pGetUserDefaultUILanguage()) == LANG_ENGLISH;
|
||||||
|
|
||||||
|
return PRIMARYLANGID(GetUserDefaultLangID()) == LANG_ENGLISH;
|
||||||
|
}
|
||||||
|
|
||||||
static void test_EventLog(void)
|
static void test_EventLog(void)
|
||||||
{
|
{
|
||||||
SC_HANDLE scm_handle, svc_handle;
|
SC_HANDLE scm_handle, svc_handle;
|
||||||
|
@ -2715,7 +2735,8 @@ todo_wine
|
||||||
ok(!strcmp(config->lpServiceStartName, "LocalSystem") /* XP */ ||
|
ok(!strcmp(config->lpServiceStartName, "LocalSystem") /* XP */ ||
|
||||||
!strcmp(config->lpServiceStartName, "NT AUTHORITY\\LocalService"),
|
!strcmp(config->lpServiceStartName, "NT AUTHORITY\\LocalService"),
|
||||||
"got %s\n", config->lpServiceStartName);
|
"got %s\n", config->lpServiceStartName);
|
||||||
ok(!strcmp(config->lpDisplayName, "Event Log") /* XP */ ||
|
ok(!is_lang_english() || /* DisplayName is often translated */
|
||||||
|
!strcmp(config->lpDisplayName, "Event Log") /* XP */ ||
|
||||||
!strcmp(config->lpDisplayName, "Windows Event Log") /* Vista+ */, "got %s\n", config->lpDisplayName);
|
!strcmp(config->lpDisplayName, "Windows Event Log") /* Vista+ */, "got %s\n", config->lpDisplayName);
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, config);
|
HeapFree(GetProcessHeap(), 0, config);
|
||||||
|
|
Loading…
Reference in New Issue