Huw Davies : kernel32/tests: Windows 10 accepts locale names like "zz-ZZ" and "foo".
Alexandre Julliard
julliard at winehq.org
Tue Jan 17 15:10:32 CST 2017
Module: wine
Branch: master
Commit: 8948174aebafa5005a8ea6319bcb82e5d23e353a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8948174aebafa5005a8ea6319bcb82e5d23e353a
Author: Huw Davies <huw at codeweavers.com>
Date: Tue Jan 17 10:51:44 2017 +0000
kernel32/tests: Windows 10 accepts locale names like "zz-ZZ" and "foo".
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/tests/locale.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/kernel32/tests/locale.c b/dlls/kernel32/tests/locale.c
index 07d6f8c..2300956 100644
--- a/dlls/kernel32/tests/locale.c
+++ b/dlls/kernel32/tests/locale.c
@@ -43,6 +43,7 @@ static const WCHAR symbols_stripped[] = {'j','u','s','t','a','t','e','s','t','s'
static const WCHAR localeW[] = {'e','n','-','U','S',0};
static const WCHAR fooW[] = {'f','o','o',0};
static const WCHAR emptyW[] = {0};
+static const WCHAR invalidW[] = {'i','n','v','a','l','i','d',0};
static inline unsigned int strlenW( const WCHAR *str )
{
@@ -2644,7 +2645,7 @@ static void test_LCMapStringEx(void)
trace("testing LCMapStringEx\n");
SetLastError(0xdeadbeef);
- ret = pLCMapStringEx(fooW, LCMAP_LOWERCASE,
+ ret = pLCMapStringEx(invalidW, LCMAP_LOWERCASE,
upper_case, -1, buf, sizeof(buf)/sizeof(WCHAR), NULL, NULL, 0);
todo_wine {
ok(!ret, "LCMapStringEx should fail with bad locale name\n");
@@ -2738,7 +2739,7 @@ static void test_LocaleNameToLCID(void)
/* bad name */
SetLastError(0xdeadbeef);
- lcid = pLocaleNameToLCID(fooW, 0);
+ lcid = pLocaleNameToLCID(invalidW, 0);
ok(!lcid && GetLastError() == ERROR_INVALID_PARAMETER,
"Expected lcid == 0, got %08x, error %d\n", lcid, GetLastError());
@@ -4463,7 +4464,8 @@ static void test_IsValidLocaleName(void)
{
static const WCHAR enusW[] = {'e','n','-','U','S',0};
static const WCHAR zzW[] = {'z','z',0};
- static const WCHAR zzzzW[] = {'z','z','-','Z','Z',0};
+ static const WCHAR zz_zzW[] = {'z','z','-','Z','Z',0};
+ static const WCHAR zzzzW[] = {'z','z','z','z',0};
BOOL ret;
if (!pIsValidLocaleName)
@@ -4475,7 +4477,9 @@ static void test_IsValidLocaleName(void)
ret = pIsValidLocaleName(enusW);
ok(ret, "IsValidLocaleName failed\n");
ret = pIsValidLocaleName(zzW);
- ok(!ret, "IsValidLocaleName should have failed\n");
+ ok(!ret || broken(ret), "IsValidLocaleName should have failed\n");
+ ret = pIsValidLocaleName(zz_zzW);
+ ok(!ret || broken(ret), "IsValidLocaleName should have failed\n");
ret = pIsValidLocaleName(zzzzW);
ok(!ret, "IsValidLocaleName should have failed\n");
ret = pIsValidLocaleName(LOCALE_NAME_INVARIANT);
More information about the wine-cvs
mailing list