mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
msvcrt/tests: Add tests for _wcsicmp_l.
This commit is contained in:
parent
a1dadf3683
commit
243a014123
2 changed files with 36 additions and 0 deletions
|
@ -798,6 +798,40 @@ static void test___mb_cur_max_func(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test__wcsicmp_l(void)
|
||||||
|
{
|
||||||
|
const struct {
|
||||||
|
const wchar_t *str1;
|
||||||
|
const wchar_t *str2;
|
||||||
|
int exp;
|
||||||
|
const char *loc;
|
||||||
|
} tests[] = {
|
||||||
|
{ L"i", L"i", 0 },
|
||||||
|
{ L"I", L"i", 0 },
|
||||||
|
{ L"I", L"i", 0, "Turkish" },
|
||||||
|
{ L"i", L"a", 8 },
|
||||||
|
{ L"a", L"i", -8 },
|
||||||
|
{ L"i", L"a", 8, "Turkish" },
|
||||||
|
};
|
||||||
|
int ret, i;
|
||||||
|
|
||||||
|
for(i=0; i<ARRAY_SIZE(tests); i++) {
|
||||||
|
_locale_t loc = NULL;
|
||||||
|
|
||||||
|
if(tests[i].loc && !(loc = _create_locale(LC_ALL, tests[i].loc))) {
|
||||||
|
win_skip("locale %s not available. skipping\n", tests[i].loc);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = _wcsicmp_l(tests[i].str1, tests[i].str2, loc);
|
||||||
|
ok(ret == tests[i].exp, "_wcsicmp_l = %d, expected %d for test %d '%ls' vs '%ls' using %s locale\n",
|
||||||
|
ret, tests[i].exp, i, tests[i].str1, tests[i].str2, loc ? tests[i].loc : "current");
|
||||||
|
|
||||||
|
if(loc)
|
||||||
|
_free_locale(loc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(locale)
|
START_TEST(locale)
|
||||||
{
|
{
|
||||||
init();
|
init();
|
||||||
|
@ -806,4 +840,5 @@ START_TEST(locale)
|
||||||
test_setlocale();
|
test_setlocale();
|
||||||
test__Gettnames();
|
test__Gettnames();
|
||||||
test___mb_cur_max_func();
|
test___mb_cur_max_func();
|
||||||
|
test__wcsicmp_l();
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ _ACRTIMP void* __cdecl memmove(void*,const void*,size_t);
|
||||||
|
|
||||||
_ACRTIMP wchar_t* __cdecl _wcsdup(const wchar_t*) __WINE_DEALLOC(free) __WINE_MALLOC;
|
_ACRTIMP wchar_t* __cdecl _wcsdup(const wchar_t*) __WINE_DEALLOC(free) __WINE_MALLOC;
|
||||||
_ACRTIMP int __cdecl _wcsicmp(const wchar_t*,const wchar_t*);
|
_ACRTIMP int __cdecl _wcsicmp(const wchar_t*,const wchar_t*);
|
||||||
|
_ACRTIMP int __cdecl _wcsicmp_l(const wchar_t*,const wchar_t*, _locale_t);
|
||||||
_ACRTIMP int __cdecl _wcsicoll(const wchar_t*,const wchar_t*);
|
_ACRTIMP int __cdecl _wcsicoll(const wchar_t*,const wchar_t*);
|
||||||
_ACRTIMP int __cdecl _wcsicoll_l(const wchar_t*, const wchar_t*, _locale_t);
|
_ACRTIMP int __cdecl _wcsicoll_l(const wchar_t*, const wchar_t*, _locale_t);
|
||||||
_ACRTIMP wchar_t* __cdecl _wcslwr(wchar_t*);
|
_ACRTIMP wchar_t* __cdecl _wcslwr(wchar_t*);
|
||||||
|
|
Loading…
Reference in a new issue