Commit 0a366f7e authored by John Zourlios's avatar John Zourlios Committed by Alexandre Julliard

kernelbase: Accept LINGUISTIC_IGNOREDIACRITIC & SORT_DIGITSASNUMBERS in CompareStringEx().

parent ed61ff43
...@@ -1864,12 +1864,9 @@ static void test_CompareStringA(void) ...@@ -1864,12 +1864,9 @@ static void test_CompareStringA(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = CompareStringA(entry->lcid, entry->flags, entry->first, entry->first_len, ret = CompareStringA(entry->lcid, entry->flags, entry->first, entry->first_len,
entry->second, entry->second_len); entry->second, entry->second_len);
todo_wine_if (entry->flags == LINGUISTIC_IGNOREDIACRITIC)
{
ok(ret == entry->ret, "%d: got %d, expected %d\n", i, ret, entry->ret); ok(ret == entry->ret, "%d: got %d, expected %d\n", i, ret, entry->ret);
ok(GetLastError() == (ret ? 0xdeadbeef : entry->le), "%d: got last error %d, expected %d\n", ok(GetLastError() == (ret ? 0xdeadbeef : entry->le), "%d: got last error %d, expected %d\n",
i, GetLastError(), (ret ? 0xdeadbeef : entry->le)); i, GetLastError(), (ret ? 0xdeadbeef : entry->le));
}
} }
ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "Salute", -1); ret = CompareStringA(lcid, NORM_IGNORECASE, "Salut", -1, "Salute", -1);
...@@ -2036,7 +2033,7 @@ static void test_CompareStringW(void) ...@@ -2036,7 +2033,7 @@ static void test_CompareStringW(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = CompareStringW(CP_ACP, SORT_DIGITSASNUMBERS, L"NULL", -1, L"NULL", -1); ret = CompareStringW(CP_ACP, SORT_DIGITSASNUMBERS, L"NULL", -1, L"NULL", -1);
todo_wine ok(ret == CSTR_EQUAL || broken(!ret && GetLastError() == ERROR_INVALID_FLAGS) /* <Win7 */, ok(ret == CSTR_EQUAL || broken(!ret && GetLastError() == ERROR_INVALID_FLAGS) /* <Win7 */,
"expected CSTR_EQUAL, got %d, last error %d\n", ret, GetLastError()); "expected CSTR_EQUAL, got %d, last error %d\n", ret, GetLastError());
ret = CompareStringW(CP_ACP, 0, ABC_EE, 3, ABC_FF, 3); ret = CompareStringW(CP_ACP, 0, ABC_EE, 3, ABC_FF, 3);
......
...@@ -3056,7 +3056,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1, ...@@ -3056,7 +3056,8 @@ INT WINAPI CompareStringEx( const WCHAR *locale, DWORD flags, const WCHAR *str1,
{ {
DWORD supported_flags = NORM_IGNORECASE | NORM_IGNORENONSPACE | NORM_IGNORESYMBOLS | SORT_STRINGSORT | DWORD supported_flags = NORM_IGNORECASE | NORM_IGNORENONSPACE | NORM_IGNORESYMBOLS | SORT_STRINGSORT |
NORM_IGNOREKANATYPE | NORM_IGNOREWIDTH | LOCALE_USE_CP_ACP; NORM_IGNOREKANATYPE | NORM_IGNOREWIDTH | LOCALE_USE_CP_ACP;
DWORD semistub_flags = NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE | 0x10000000; DWORD semistub_flags = NORM_LINGUISTIC_CASING | LINGUISTIC_IGNORECASE | LINGUISTIC_IGNOREDIACRITIC |
SORT_DIGITSASNUMBERS | 0x10000000;
/* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */ /* 0x10000000 is related to diacritics in Arabic, Japanese, and Hebrew */
INT ret; INT ret;
static int once; static int once;
......
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