Commit 417814af authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

advapi32/tests: On Windows 7 GetServiceKeyName() fails for all localized display names.

It's not just the service display names that contain a smart quote that Windows 7 fails to handle, it's all localized names. Signed-off-by: 's avatarFrancois Gouget <fgouget@icodeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f08abe08
...@@ -720,17 +720,6 @@ static void test_get_displayname(void) ...@@ -720,17 +720,6 @@ static void test_get_displayname(void)
CloseServiceHandle(scm_handle); CloseServiceHandle(scm_handle);
} }
static int is_printable_ascii_str(const char *s)
{
while (*s)
{
if (*s < 32 || *s >= 127)
return 0;
s++;
}
return 1;
}
static void test_get_servicekeyname(void) static void test_get_servicekeyname(void)
{ {
SC_HANDLE scm_handle, svc_handle; SC_HANDLE scm_handle, svc_handle;
...@@ -872,10 +861,10 @@ static void test_get_servicekeyname(void) ...@@ -872,10 +861,10 @@ static void test_get_servicekeyname(void)
servicesize = 0; servicesize = 0;
ret = GetServiceKeyNameA(scm_handle, displayname, NULL, &servicesize); ret = GetServiceKeyNameA(scm_handle, displayname, NULL, &servicesize);
ok(!ret, "Expected failure\n"); ok(!ret, "Expected failure\n");
if (!is_printable_ascii_str(displayname) && if (strcmp(displayname, "Print Spooler") != 0 &&
GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST) GetLastError() == ERROR_SERVICE_DOES_NOT_EXIST)
{ {
win_skip("GetServiceKeyName() does not support non-ASCII display names: %s\n", displayname); /* Windows 7 */ win_skip("GetServiceKeyName() does not support localized display names: %s\n", displayname); /* Windows 7 */
CloseServiceHandle(scm_handle); CloseServiceHandle(scm_handle);
return; /* All the tests that follow will fail too */ return; /* All the tests that follow will fail too */
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment