51 static const char lc_all[] =
"LC_COLLATE=C;LC_CTYPE=C;"
52 "LC_MONETARY=Greek_Greece.1253;LC_NUMERIC=Polish_Poland.1250;LC_TIME=C";
71 win_skip(
"System with limited locales\n");
104 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
124 ok(!
strcmp(
ret,
"Chinese (Simplified)_People's Republic of China.936")
125 || !
strcmp(
ret,
"Chinese (Simplified)_China.936")
131 ok(!
strcmp(
ret,
"Chinese (Simplified)_People's Republic of China.936")
132 || !
strcmp(
ret,
"Chinese (Simplified)_China.936")
139 ok(!
strcmp(
ret,
"Chinese (Traditional)_Taiwan.950")
145 ok(!
strcmp(
ret,
"Chinese (Simplified)_People's Republic of China.936")
146 || !
strcmp(
ret,
"Chinese (Simplified)_China.936")
147 ||
broken(!
strcmp(
ret,
"Chinese_People's Republic of China.936")),
"ret = %s\n",
ret);
152 ok(!
strcmp(
ret,
"Chinese (Traditional)_Taiwan.950")
159 trace(
"Chinese_China.936=%s\n",
ret);
160 ok(!
strcmp(
ret,
"Chinese (Simplified)_People's Republic of China.936")
161 || !
strcmp(
ret,
"Chinese (Simplified)_China.936")
162 ||
broken(!
strcmp(
ret,
"Chinese_People's Republic of China.936")),
"ret = %s\n",
ret);
169 || !
strcmp(
ret,
"Czech_Czechia.1250"),
"ret = %s\n",
ret);
175 || !
strcmp(
ret,
"Czech_Czechia.1250"),
"ret = %s\n",
ret);
239 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
250 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
255 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
284 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
289 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
463 || !
strcmp(
ret,
"Norwegian (Nynorsk)_Norway.1252")
471 ok(!
strcmp(
ret,
"Norwegian (Bokm\xe5l)_Norway.1252")
472 || !
strcmp(
ret,
"Norwegian Bokm\xe5l_Norway.1252")
473 || !
strcmp(
ret,
"Norwegian (Bokmal)_Norway.1252")
480 ok(!
strcmp(
ret,
"Norwegian (Bokm\xe5l)_Norway.1252")
481 || !
strcmp(
ret,
"Norwegian Bokm\xe5l_Norway.1252")
482 || !
strcmp(
ret,
"Norwegian (Bokmal)_Norway.1252")
490 || !
strcmp(
ret,
"Norwegian (Nynorsk)_Norway.1252")
562 ok(!
strcmp(
ret,
"Spanish - Modern Sort_Spain.1252")
563 || !
strcmp(
ret,
"Spanish_Spain.1252"),
"ret = %s\n",
ret);
584 || !
strcmp(
ret,
"Turkish_T\xfcrkiye.1254"),
"ret = %s\n",
ret);
590 || !
strcmp(
ret,
"Turkish_T\xfcrkiye.1254"),
"ret = %s\n",
ret);
601 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
606 ok(!
strcmp(
ret,
"English_United States.1252"),
"ret = %s\n",
ret);
638 if(
buf[0] ==
'0' && !
buf[1])
662 const wchar_t *
str[] = {
L"0",
L"A",
L" ",
L"\0",
L"\x04d2" };
668 if(!p__crtGetStringTypeW) {
669 win_skip(
"Skipping __crtGetStringTypeW tests\n");
674 win_skip(
"Too old version of msvcrt.dll\n");
679 ret_crt = p__crtGetStringTypeW(0,
CT_CTYPE1,
str[
i], 1, &out_crt);
681 ok(
ret == ret_crt,
"%d) ret_crt = %d\n",
i, (
int)ret_crt);
682 ok(
out == out_crt,
"%d) out_crt = %x, expected %x\n",
i, (
int)out_crt, (
int)
out);
684 ret_crt = p__crtGetStringTypeW(0,
CT_CTYPE2,
str[
i], 1, &out_crt);
686 ok(
ret == ret_crt,
"%d) ret_crt = %d\n",
i, (
int)ret_crt);
687 ok(
out == out_crt,
"%d) out_crt = %x, expected %x\n",
i, (
int)out_crt, (
int)
out);
689 ret_crt = p__crtGetStringTypeW(0,
CT_CTYPE3,
str[
i], 1, &out_crt);
691 ok(
ret == ret_crt,
"%d) ret_crt = %d\n",
i, (
int)ret_crt);
692 ok(
out == out_crt,
"%d) out_crt = %x, expected %x\n",
i, (
int)out_crt, (
int)
out);
695 ret = p__crtGetStringTypeW(0, 3,
str[0], 1, &
out);
696 ok(!
ret,
"ret == TRUE\n");
701 static const DWORD time_data[] = {
738 if(
sizeof(
void*) == 8)
746 time_data[
i],
buf,
sizeof(
buf));
751 ok(
ret->wstr[0] !=
NULL,
"ret->wstr[0] = NULL\n");
753 "ret->str[42] = %p len = %Id, ret->wstr[0] = %p\n",
764 time_data[
i],
buf,
sizeof(
buf));
780 if(!p___mb_cur_max_func)
781 win_skip(
"Skipping ___mb_cur_max_func tests\n");
783 mb_cur_max = p___mb_cur_max_func();
784 ok(mb_cur_max == 1,
"mb_cur_max = %d, expected 1\n", mb_cur_max);
788 win_skip(
"Skipping test with chinese locale\n");
790 mb_cur_max = p___mb_cur_max_func();
791 ok(mb_cur_max == 2,
"mb_cur_max = %d, expected 2\n", mb_cur_max);
798 skip(
"Skipping __p___mb_cur_max tests\n");
801 ok(mb_cur_max == 1,
"mb_cur_max = %d, expected 1\n", mb_cur_max);
805 win_skip(
"Skipping test with chinese locale\n");
808 ok(mb_cur_max == 2,
"mb_cur_max = %d, expected 2\n", mb_cur_max);
824 {
L"I",
L"i", 0,
"Turkish" },
827 {
L"i",
L"a", 8,
"Turkish" },
831 if (!p_wcsicmp_l || !p_create_locale)
833 win_skip(
"_wcsicmp_l or _create_locale not available\n");
836 ok(!!p_free_locale,
"_free_locale not available\n");
847 ok(
ret ==
tests[
i].
exp,
"_wcsicmp_l = %d, expected %d for test %d '%ls' vs '%ls' using %s locale\n",
860 ok(!
strcmp(
ret,
"C"),
"expected ret=C, but received ret=%s\n",
ret);
863 ok(
strcmp(
ret,
"Invariant Language_Invariant Country.0"),
"expected valid locale\n");
884 if (!p_create_locale)
886 win_skip(
"_create_locale isn't available.\n");
891 skip(
"Skip language-specific tests on Japanese system.\n");
895 locale2 = p_create_locale(
LC_ALL,
".932");
907 "Got wrong LC_CTYPE codepage %d vs %d.\n",
locinfo->lc_id[
LC_CTYPE].wCodePage,
913 ok(!
ret,
"Got wrong ctype1 data.\n");
915 ok(!
ret,
"Got wrong pclmap data.\n");
917 ok(!
ret,
"Got wrong pcumap data.\n");
921 p_free_locale(locale2);
922 locale2 = p_create_locale(
LC_ALL,
"Japanese_Japan.1252");
935 "Got wrong LC_CTYPE codepage %d vs %d.\n",
locinfo->lc_id[
LC_CTYPE].wCodePage,
941 ok(!!
ret,
"Got wrong ctype1 data.\n");
943 ok(!!
ret,
"Got wrong pclmap data.\n");
945 ok(!!
ret,
"Got wrong pcumap data.\n");
949 p_free_locale(locale2);
950 locale2 = p_create_locale(
LC_ALL,
"Japanese_Japan.3000");
951 ok(!locale2,
"Got %p.\n", locale2);
957 locale2 = p_create_locale(
LC_ALL,
"German_Germany.1252");
968 "Got wrong LC_CTYPE codepage %d vs %d.\n",
locinfo->lc_id[
LC_CTYPE].wCodePage,
974 ok(!!
ret,
"Got wrong ctype1 data.\n");
976 ok(!!
ret,
"Got wrong pclmap data.\n");
978 ok(!!
ret,
"Got wrong pcumap data.\n");
982 p_free_locale(locale2);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
int strncmp(const char *String1, const char *String2, ACPI_SIZE Count)
char * strchr(const char *String, int ch)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
BOOL WINAPI IsValidCodePage(UINT codepage)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
LCID WINAPI GetUserDefaultLCID(void)
LANGID WINAPI GetUserDefaultLangID(void)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLenum GLuint GLenum GLsizei const GLchar * buf
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_Check_return_ int __cdecl atoi(_In_z_ const char *_Str)
static struct test_info tests[]
#define sprintf(buf, format,...)
static PEXPLICIT_ACCESSW *static HMODULE hmod
static const wchar_t _locale_t
static void test__Gettnames(void)
static void test_thread_setlocale(void)
static void test_crtGetStringTypeW(void)
static unsigned __stdcall test_thread_setlocale_func(void *arg)
void *__cdecl _Gettnames(void)
static const wchar_t WORD *static size_t
static void test_setlocale(void)
static void test_locale_info(void)
static int *__cdecl * p__p___mb_cur_max(void)
static void test__wcsicmp_l(void)
static void test___mb_cur_max_func(void)
#define MAKELCID(lgid, srtid)
_CRTIMP uintptr_t __cdecl _beginthreadex(_In_opt_ void *_Security, _In_ unsigned _StackSize, _In_ unsigned(__stdcall *_StartAddress)(void *), _In_opt_ void *_ArgList, _In_ unsigned _InitFlag, _Out_opt_ unsigned *_ThrdAddr)
#define SUBLANG_ENGLISH_US
unsigned long lc_handle[6]
const unsigned char * pclmap
struct threadlocaleinfostruct::@3947 lc_category[6]
const unsigned char * pcumap
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
DWORD WINAPI GetLastError(void)
#define LOCALE_SABBREVMONTHNAME10
#define LOCALE_SMONTHNAME12
#define LOCALE_IDEFAULTCODEPAGE
#define LOCALE_SMONTHNAME5
#define LOCALE_SABBREVMONTHNAME9
#define LOCALE_SABBREVMONTHNAME11
#define LOCALE_SABBREVDAYNAME5
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_SABBREVMONTHNAME2
#define LOCALE_SMONTHNAME3
#define LOCALE_SMONTHNAME11
#define LOCALE_SMONTHNAME8
#define LOCALE_SMONTHNAME4
#define LOCALE_SMONTHNAME7
#define LOCALE_SSHORTDATE
#define LOCALE_SABBREVMONTHNAME4
#define LOCALE_SABBREVDAYNAME4
#define LOCALE_SMONTHNAME1
#define LOCALE_SABBREVMONTHNAME3
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_IDEFAULTANSICODEPAGE
#define LOCALE_SABBREVDAYNAME6
#define LOCALE_SMONTHNAME2
#define LOCALE_STIMEFORMAT
#define LOCALE_SABBREVDAYNAME1
#define LOCALE_SABBREVMONTHNAME6
#define LOCALE_SMONTHNAME6
#define LOCALE_SABBREVDAYNAME3
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SABBREVMONTHNAME7
#define LOCALE_SABBREVMONTHNAME8
#define LOCALE_SMONTHNAME10
#define LOCALE_SMONTHNAME9
#define LOCALE_SABBREVMONTHNAME12
#define LOCALE_SABBREVDAYNAME7