Francois Gouget : advapi32/tests: On Windows 7 GetServiceKeyName() fails for all localized display names.
Alexandre Julliard
julliard at winehq.org
Mon Mar 23 15:47:09 CDT 2020
Module: wine
Branch: master
Commit: 417814afcbfc6b9daf3a7053a900bc80e0127fd7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=417814afcbfc6b9daf3a7053a900bc80e0127fd7
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Sun Mar 22 18:59:20 2020 +0100
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: Francois Gouget <fgouget at icodeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/advapi32/tests/service.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/dlls/advapi32/tests/service.c b/dlls/advapi32/tests/service.c
index 43d9738627..4bf9f4c34b 100644
--- a/dlls/advapi32/tests/service.c
+++ b/dlls/advapi32/tests/service.c
@@ -720,17 +720,6 @@ static void test_get_displayname(void)
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)
{
SC_HANDLE scm_handle, svc_handle;
@@ -872,10 +861,10 @@ static void test_get_servicekeyname(void)
servicesize = 0;
ret = GetServiceKeyNameA(scm_handle, displayname, NULL, &servicesize);
ok(!ret, "Expected failure\n");
- if (!is_printable_ascii_str(displayname) &&
+ if (strcmp(displayname, "Print Spooler") != 0 &&
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);
return; /* All the tests that follow will fail too */
}
More information about the wine-cvs
mailing list