39static const WCHAR upper_case[] = {
'\t',
'J',
'U',
'S',
'T',
'!',
' ',
'A',
',',
' ',
'T',
'E',
'S',
'T',
';',
' ',
'S',
'T',
'R',
'I',
'N',
'G',
' ',
'1',
'/',
'*',
'+',
'-',
'.',
'\r',
'\n',0};
40static const WCHAR lower_case[] = {
'\t',
'j',
'u',
's',
't',
'!',
' ',
'a',
',',
' ',
't',
'e',
's',
't',
';',
' ',
's',
't',
'r',
'i',
'n',
'g',
' ',
'1',
'/',
'*',
'+',
'-',
'.',
'\r',
'\n',0};
41static const WCHAR title_case[] = {
'\t',
'J',
'u',
's',
't',
'!',
' ',
'A',
',',
' ',
'T',
'e',
's',
't',
';',
' ',
'S',
't',
'r',
'i',
'n',
'g',
' ',
'1',
'/',
'*',
'+',
'-',
'.',
'\r',
'\n',0};
42static const WCHAR symbols_stripped[] = {
'j',
'u',
's',
't',
'a',
't',
'e',
's',
't',
's',
't',
'r',
'i',
'n',
'g',
'1',0};
58 while ((--
n > 0) && *str1 && (*str1 == *str2)) { str1++; str2++; }
111#define X(f) p##f = (void*)GetProcAddress(mod, #f)
129 X(CompareStringOrdinal);
137 X(GetNumberFormatEx);
144#define eq(received, expected, label, type) \
145 ok((received) == (expected), "%s: got " type " instead of " type "\n", \
146 (label), (received), (expected))
148#define BUFFER_SIZE 128
149#define COUNTOF(x) (sizeof(x)/sizeof(x)[0])
151#define STRINGSA(x,y) strcpy(input, x); strcpy(Expected, y); SetLastError(0xdeadbeef); buffer[0] = '\0'
152#define EXPECT_LENA ok(ret == lstrlenA(Expected)+1, "Expected len %d, got %d\n", lstrlenA(Expected)+1, ret)
153#define EXPECT_EQA ok(strncmp(buffer, Expected, strlen(Expected)) == 0, \
154 "Expected '%s', got '%s'\n", Expected, buffer)
156#define STRINGSW(x,y) MultiByteToWideChar(CP_ACP,0,x,-1,input,COUNTOF(input)); \
157 MultiByteToWideChar(CP_ACP,0,y,-1,Expected,COUNTOF(Expected)); \
158 SetLastError(0xdeadbeef); buffer[0] = '\0'
159#define EXPECT_LENW ok(ret == lstrlenW(Expected)+1, "Expected Len %d, got %d\n", lstrlenW(Expected)+1, ret)
160#define EXPECT_EQW ok(strncmpW(buffer, Expected, strlenW(Expected)) == 0, "Bad conversion\n")
162#define NUO LOCALE_NOUSEROVERRIDE
173 ok(lcid == 0x409,
"wrong LCID calculated - %d\n", lcid);
177 ok(
val == lcid,
"got 0x%08x\n",
val);
188 "got %d with '%s' (expected %d with '%s')\n",
198 "got %d with '%s' (expected %d with '%s')\n",
202 win_skip(
"LANG_ARABIC not installed\n");
211 "got %d with '%s' (expected %d with '%s')\n",
227 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
247 { {
'a',
'r',0}, {
'a',
'r',
'-',
'S',
'A',0},
249 { {
'a',
'z',0}, {
'a',
'z',
'-',
'L',
'a',
't',
'n',
'-',
'A',
'Z',0},
251 { {
'd',
'e',0}, {
'd',
'e',
'-',
'D',
'E',0},
253 { {
'e',
'n',0}, {
'e',
'n',
'-',
'U',
'S',0},
255 { {
'e',
's',0}, {
'e',
's',
'-',
'E',
'S',0},
258 {
'e',
's',
'-',
'E',
'S',
'_',
't',
'r',
'a',
'd',
'n',
'l',0} },
259 { {
'g',
'a',0}, {
'g',
'a',
'-',
'I',
'E',0},
261 { {
'i',
't',0}, {
'i',
't',
'-',
'I',
'T',0},
263 { {
'm',
's',0}, {
'm',
's',
'-',
'M',
'Y',0},
265 { {
'n',
'l',0}, {
'n',
'l',
'-',
'N',
'L',0},
267 { {
'p',
't',0}, {
'p',
't',
'-',
'B',
'R',0},
269 { {
's',
'r',0}, {
'h',
'r',
'-',
'H',
'R',0},
271 { {
's',
'v',0}, {
's',
'v',
'-',
'S',
'E',0},
273 { {
'u',
'z',0}, {
'u',
'z',
'-',
'L',
'a',
't',
'n',
'-',
'U',
'Z',0},
275 { {
'z',
'h',0}, {
'z',
'h',
'-',
'C',
'N',0},
285 WCHAR bufferW[80], buffer2W[80];
293 win_skip(
"GetLocaleInfoW() isn't implemented\n");
299 ok(
val == lcid_en,
"got 0x%08x\n",
val);
304 static const WCHAR slangW[] = {
'E',
'n',
'g',
'l',
'i',
's',
'h',
' ',
'(',
'U',
'n',
'i',
't',
'e',
'd',
' ',
305 'S',
't',
'a',
't',
'e',
's',
')',0};
306 static const WCHAR statesW[] = {
'U',
'n',
'i',
't',
'e',
'd',
' ',
'S',
't',
'a',
't',
'e',
's',0};
307 static const WCHAR enW[] = {
'e',
'n',
'-',
'U',
'S',0};
317 skip(
"Non-English locale\n");
327 skip(
"Non-English locale\n");
344 ok(
val ==
ptr->lcid || (
val &&
broken(
val ==
ptr->lcid_broken)),
"%s: got wrong lcid 0x%04x, expected 0x%04x\n",
357 win_skip(
"English neutral locale not supported\n");
361 win_skip(
"LANG_RUSSIAN locale data unavailable\n");
367 win_skip(
"LOCALE_RETURN_GENITIVE_NAMES isn't supported\n");
376 ok(
ret == 0,
"LOCALE_RETURN_GENITIVE_NAMES should fail with GetLocaleInfoA\n");
377 ok(bufferA[0] ==
'a',
"Expected buffer to be untouched\n");
379 "Expected ERROR_INVALID_FLAGS, got %x\n",
GetLastError());
386 "LOCALE_RETURN_GENITIVE_NAMES itself doesn't return anything, got %d\n",
ret);
387 ok(bufferW[0] ==
'a',
"Expected buffer to be untouched\n");
389 "Expected ERROR_INVALID_FLAGS, got %x\n",
GetLastError());
392 for (
i = 0;
i < 12;
i++) {
396 ok(
ret,
"Expected non zero result\n");
397 ok(
ret ==
lstrlenW(bufferW)+1,
"Expected actual length, got %d, length %d\n",
402 ok(
ret,
"Expected non zero result\n");
403 ok(
ret ==
lstrlenW(buffer2W)+1,
"Expected actual length, got %d, length %d\n",
407 "Expected genitive name to differ, got the same for month %d\n",
i+1);
413 ok(
ret,
"Expected non zero result\n");
414 ok(
ret ==
lstrlenW(bufferW)+1,
"Expected actual length, got %d, length %d\n",
419 ok(
ret,
"Expected non zero result\n");
420 ok(
ret ==
lstrlenW(buffer2W)+1,
"Expected actual length, got %d, length %d\n",
424 "Expected same names, got different for month %d\n",
i+1);
440 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
446 STRINGSA(
"tt HH':'mm'@'ss",
"AM 08:56@13");
456 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
462 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
464 STRINGSA(
"tt HH':'mm'@'ss",
"AM 08:56@13");
478 "Expected '', got '%s'\n",
buffer );
491 STRINGSA(
"h.@:m.@:s.@:tt",
"8.@:56AM");
495 "Expected '8.@:56AM', got '%s'\n",
buffer );
501 "Expected '', got '%s'\n",
buffer );
519 STRINGSA(
"h:m:s tt",
"13:56:13 PM");
532 STRINGSA(
"h hh H HH m mm s ss t tt",
"2 02 14 14 5 05 3 03 P PM");
538 STRINGSA(
"h/H/hh/HH",
"12/0/12/00");
558 STRINGSA(
"h:hh:hhh H:HH:HHH m:mm:mmm M:MM:MMM s:ss:sss S:SS:SSS",
559 "8:08:08 8:08:08 56:56:56 M:MM:MMM 13:13:13 S:SS:SSS");
570 STRINGSA(
"h 'h' H 'H' HH 'HH' m 'm' s 's' t 't' tt 'tt'",
571 "8 h 8 H 08 HH 56 m 13 s A t AM tt");
613 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
629 if (!pGetTimeFormatEx)
631 win_skip(
"GetTimeFormatEx not supported\n");
640 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
646 STRINGSW(
"tt HH':'mm'@'ss",
"AM 08:56@13");
656 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
662 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
664 STRINGSW(
"tt HH':'mm'@'ss",
"AM 08:56@13");
689 STRINGSW(
"h.@:m.@:s.@:tt",
"8.@:56AM");
715 STRINGSW(
"h:m:s tt",
"13:56:13 PM");
728 STRINGSW(
"h hh H HH m mm s ss t tt",
"2 02 14 14 5 05 3 03 P PM");
734 STRINGSW(
"h/H/hh/HH",
"12/0/12/00");
754 STRINGSW(
"h:hh:hhh H:HH:HHH m:mm:mmm M:MM:MMM s:ss:sss S:SS:SSS",
755 "8:08:08 8:08:08 56:56:56 M:MM:MMM 13:13:13 S:SS:SSS");
766 STRINGSW(
"h 'h' H 'H' HH 'HH' m 'm' s 's' t 't' tt 'tt'",
767 "8 h 8 H 08 HH 56 m 13 s A t AM tt");
809 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
827 char short_day[10],
month[10], genitive_month[10];
834 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
836 curtime.
wYear = 2002;
840 STRINGSA(
"ddd',' MMM dd yy",
"Sat, May 04 02");
850 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
853 STRINGSA(
"ddd',' MMM dd yy",
"Sat, May 04 02");
859 STRINGSA(
"ddd',' MMM dd ''''yy",
"Sat, May 04 '02");
864 STRINGSA(
"ddd',' MMM dd ''''yy",
"");
869 STRINGSA(
"ddd',' MMM dd ''''yy",
"");
873 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
875 STRINGSA(
"ddd',' MMM dd ''''yy",
"5/4/2002");
886 "got an unexpected date string '%s'\n",
buffer);
890 STRINGSA(
"ddd',' MMM dd ''''yy",
"");
894 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
904 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
909 win_skip(
"LANG_RUSSIAN locale data unavailable\n");
918 ok(
strcmp(genitive_month,
month) != 0,
"Expected different month forms\n");
966 STRINGSA(
"dd dddMMMM ddd MMMMdd",
"");
992 if (!pGetDateFormatEx)
994 win_skip(
"GetDateFormatEx not supported\n");
1003 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
1010 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1022 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
1025 curtime.
wYear = 2002;
1029 curtime.
wHour = 65432;
1033 STRINGSW(
"dddd d MMMM yyyy",
"Wednesday 23 October 2002");
1038 curtime.
wYear = 2002;
1042 curtime.
wHour = 65432;
1046 STRINGSW(
"dddd d MMMM yyyy",
"Wednesday 23 October 2002");
1049 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1053 curtime.
wYear = 1601;
1061 STRINGSW(
"dddd d MMMM yyyy",
"Monday 1 January 1601");
1067 curtime.
wYear = 1600;
1075 STRINGSW(
"dddd d MMMM yyyy",
"Friday 31 December 1600");
1079 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1094 win_skip(
"GetDateFormatW is not implemented\n");
1098 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
1105 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1112 curtime.
wYear = 2002;
1116 curtime.
wHour = 65432;
1120 STRINGSW(
"dddd d MMMM yyyy",
"Wednesday 23 October 2002");
1127 curtime.
wYear = 1601;
1135 STRINGSW(
"dddd d MMMM yyyy",
"Monday 1 January 1601");
1141 curtime.
wYear = 1600;
1149 STRINGSW(
"dddd d MMMM yyyy",
"Friday 31 December 1600");
1153 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1157#define CY_POS_LEFT 0
1158#define CY_POS_RIGHT 1
1159#define CY_POS_LEFT_SPACE 2
1160#define CY_POS_RIGHT_SPACE 3
1164 static char szDot[] = {
'.',
'\0' };
1165 static char szComma[] = {
',',
'\0' };
1166 static char szDollar[] = {
'$',
'\0' };
1178 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1184 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1190 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1196 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1202 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1208 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1214 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
1219 ok( !
ret,
"Expected ret == 0, got %d\n",
ret);
1221 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
1227 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1257 format.NegativeOrder = 0;
1259 format.lpDecimalSep = szDot;
1260 format.lpThousandSep = szComma;
1261 format.lpCurrencySymbol = szDollar;
1287 format.NegativeOrder = 2;
1316 format.NegativeOrder = 0;
1322 format.NegativeOrder = 1;
1328 format.NegativeOrder = 2;
1334 format.NegativeOrder = 3;
1340 format.NegativeOrder = 4;
1346 format.NegativeOrder = 5;
1352 format.NegativeOrder = 6;
1358 format.NegativeOrder = 7;
1364 format.NegativeOrder = 8;
1370 format.NegativeOrder = 9;
1376 format.NegativeOrder = 10;
1382 format.NegativeOrder = 11;
1388 format.NegativeOrder = 12;
1394 format.NegativeOrder = 13;
1400 format.NegativeOrder = 14;
1406 format.NegativeOrder = 15;
1415#define NEG_LEFT_SPACE 2
1417#define NEG_RIGHT_SPACE 4
1421 static char szDot[] = {
'.',
'\0' };
1422 static char szComma[] = {
',',
'\0' };
1434 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1440 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1446 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1452 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1458 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1464 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1470 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
1475 ok( !
ret,
"Expected ret == 0, got %d\n",
ret);
1477 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
1483 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1518 format.NegativeOrder = 0;
1519 format.lpDecimalSep = szDot;
1520 format.lpThousandSep = szComma;
1604 static WCHAR commaW[] = {
',',0};
1605 static const WCHAR enW[] = {
'e',
'n',
'-',
'U',
'S',0};
1606 static const WCHAR frW[] = {
'f',
'r',
'-',
'F',
'R',0};
1607 static const WCHAR bogusW[] = {
'b',
'o',
'g',
'u',
's',0};
1610 if (!pGetNumberFormatEx)
1612 win_skip(
"GetNumberFormatEx is not available.\n");
1619 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1624 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1629 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1634 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1639 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1644 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1649 "Expected ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
1654 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1660 ok( !
ret,
"Expected ret == 0, got %d\n",
ret);
1662 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
1667 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
1702 format.NegativeOrder = 0;
1704 format.lpThousandSep = commaW;
1771 if (pIsValidLocaleName(frW))
1881 ok(!
ret,
"CompareStringA must fail with invalid flag\n");
1890 ok (
ret == 0,
"lstrcmpA(\"\", \"\") should return 0, got %d\n",
ret);
1893 ok (
ret == 0 ||
broken(
ret == -2) ,
"lstrcmpA(NULL, NULL) should return 0, got %d\n",
ret);
1896 ok (
ret == 1 ||
broken(
ret == -2) ,
"lstrcmpA(\"\", NULL) should return 1, got %d\n",
ret);
1899 ok (
ret == -1 ||
broken(
ret == -2) ,
"lstrcmpA(NULL, \"\") should return -1, got %d\n",
ret);
1954 "a\\0b vs a expected CSTR_EQUAL or CSTR_GREATER_THAN, got %d\n",
ret);
1966 ok(
ret == -1,
"\"#\" vs \".\" expected -1, got %d\n",
ret);
2178 const char *
op[] = {
"ERROR",
"CSTR_LESS_THAN",
"CSTR_EQUAL",
"CSTR_GREATER_THAN"};
2183 if (!pCompareStringEx)
2185 win_skip(
"CompareStringEx not supported\n");
2197 "%d: got %s, expected %s\n",
i,
op[
ret],
op[
e->ret]);
2233 char buf[256], buf2[256];
2234 static const char upper_case[] =
"\tJUST! A, TEST; STRING 1/*+-.\r\n";
2235 static const char lower_case[] =
"\tjust! a, test; string 1/*+-.\r\n";
2242 "ret %d, error %d, expected value %d\n",
2248 ok(!
ret,
"LCMAP_LOWERCASE and LCMAP_UPPERCASE are mutually exclusive\n");
2259 "LCMapStringA (flag %08x) unexpected error code %d\n",
2261 ok(!
ret,
"LCMapStringA (flag %08x) should return 0, got %d\n",
2269 "ret %d, error %d, expected value %d\n",
2277 "ret %d, error %d, expected value %d\n",
2286 "should return 0 and ERROR_INSUFFICIENT_BUFFER, got %d\n",
ret);
2293 trace(
"Ignoring LCMapStringA(LCMAP_UPPERCASE, buf, buf) error on Win9x\n");
2297 "ret %d, error %d, expected value %d\n",
2305 trace(
"Ignoring LCMapStringA(LCMAP_LOWERCASE, buf, buf) error on Win9x\n");
2309 "ret %d, error %d, expected value %d\n",
2321 ok(!
ret,
"src == dst without LCMAP_UPPERCASE or LCMAP_LOWERCASE must fail\n");
2326 ok(
ret,
"LCMapStringA must succeed\n");
2327 ok(
buf[
ret-1] == 0,
"LCMapStringA not null-terminated\n");
2330 ok(ret2,
"LCMapStringA must succeed\n");
2331 ok(buf2[ret2-1] == 0,
"LCMapStringA not null-terminated\n" );
2332 ok(
ret == ret2,
"lengths of sort keys must be equal\n");
2338 ok(
ret,
"LCMapStringA must succeed\n");
2341 ok(ret2,
"LCMapStringA must succeed\n");
2342 ok(
ret == ret2,
"lengths of sort keys must be equal\n");
2351 ok(
ret,
"LCMapStringA must succeed\n");
2354 ok(ret2,
"LCMapStringA must succeed\n");
2355 ok(
ret == ret2,
"lengths of sort keys must be equal\n");
2385 ok(!
ret,
"LCMapStringA should fail with srclen = 0\n");
2394 static const WCHAR japanese_text[] = {
2395 0x3044, 0x309d, 0x3084, 0x3001, 0x30a4, 0x30fc, 0x30cf,
2396 0x30c8, 0x30fc, 0x30f4, 0x30a9, 0x306e, 0x2026, 0
2398 static const WCHAR hiragana_text[] = {
2399 0x3044, 0x309d, 0x3084, 0x3001, 0x3044, 0x30fc, 0x306f,
2400 0x3068, 0x30fc, 0x3094, 0x3049, 0x306e, 0x2026, 0
2402 static const WCHAR katakana_text[] = {
2403 0x30a4, 0x30fd, 0x30e4, 0x3001, 0x30a4, 0x30fc, 0x30cf,
2404 0x30c8, 0x30fc, 0x30f4, 0x30a9, 0x30ce, 0x2026, 0
2406 static const WCHAR halfwidth_text[] = {
2407 0x3044, 0x309d, 0x3084, 0xff64, 0xff72, 0xff70, 0xff8a,
2408 0xff84, 0xff70, 0xff73, 0xff9e, 0xff6b, 0x306e, 0x2026, 0
2412 char *p_buf = (
char *)
buf, *p_buf2 = (
char *)buf2;
2418 "%s ret %d, error %d, expected value %d\n",
func_name,
2421 "Expected title case string\n");
2430 "%s (flag %08x) unexpected error code %d\n",
2432 ok(!
ret,
"%s (flag %08x) should return 0, got %d\n",
2452 japanese_text, -1,
buf,
sizeof(
buf)/
sizeof(
WCHAR));
2459 ok(
ret == 1,
"%s ret %d, error %d, expected value 1\n",
func_name,
2462 ok(buf2[0] == 0x3095 ||
broken(buf2[0] == 0x30f5 ),
2463 "%s expected %04x, got %04x\n",
func_name, 0x3095, buf2[0]);
2467 japanese_text, -1,
buf,
sizeof(
buf)/
sizeof(
WCHAR));
2474 halfwidth_text, -1,
buf,
sizeof(
buf)/
sizeof(
WCHAR));
2485 halfwidth_text, -1,
buf,
sizeof(
buf)/
sizeof(
WCHAR));
2495 japanese_text, -1,
buf,
sizeof(
buf)/
sizeof(
WCHAR));
2508 "%s should return 0 and ERROR_INSUFFICIENT_BUFFER, got %d\n",
func_name,
ret);
2516 "%s should return 0 and ERROR_INSUFFICIENT_BUFFER, got %d\n",
func_name,
ret);
2540 ok(!
ret,
"%s src == dst without LCMAP_UPPERCASE or LCMAP_LOWERCASE must fail\n",
func_name);
2549 ok(
ret == ret2,
"%s lengths of sort keys must be equal\n",
func_name);
2558 ok(ret2,
"%s func_ptr must succeed\n",
func_name);
2559 ok(
ret == ret2,
"%s lengths of sort keys must be equal\n",
func_name);
2571 ok(ret2,
"%s func_ptr must succeed\n",
func_name);
2572 ok(
ret == ret2,
"%s lengths of sort keys must be equal\n",
func_name);
2602 ok(!
ret,
"%s func_ptr should fail with srclen = 0\n",
func_name);
2617 trace(
"testing LCMapStringW\n");
2622 ok(!
ret,
"LCMapStringW should fail with bad lcid\n");
2639 if (!pLCMapStringEx)
2641 win_skip(
"LCMapStringEx not available\n" );
2645 trace(
"testing LCMapStringEx\n");
2651 ok(!
ret,
"LCMapStringEx should fail with bad locale name\n");
2684 { {
'a',
'r',0}, {
'a',
'r',
'-',
'S',
'A',0},
MAKELCID(
MAKELANGID(
LANG_ARABIC,
SUBLANG_ARABIC_SAUDI_ARABIA),
SORT_DEFAULT) },
2685 { {
'a',
'z',0}, {
'a',
'z',
'-',
'L',
'a',
't',
'n',
'-',
'A',
'Z',0},
MAKELCID(
MAKELANGID(
LANG_AZERI,
SUBLANG_AZERI_LATIN),
SORT_DEFAULT) },
2686 { {
'd',
'e',0}, {
'd',
'e',
'-',
'D',
'E',0},
MAKELCID(
MAKELANGID(
LANG_GERMAN,
SUBLANG_GERMAN),
SORT_DEFAULT) },
2687 { {
'e',
'n',0}, {
'e',
'n',
'-',
'U',
'S',0},
MAKELCID(
MAKELANGID(
LANG_ENGLISH,
SUBLANG_ENGLISH_US),
SORT_DEFAULT) },
2688 { {
'e',
's',0}, {
'e',
's',
'-',
'E',
'S',0},
MAKELCID(
MAKELANGID(
LANG_SPANISH,
SUBLANG_SPANISH_MODERN),
SORT_DEFAULT) },
2689 { {
'g',
'a',0}, {
'g',
'a',
'-',
'I',
'E',0},
MAKELCID(
MAKELANGID(
LANG_IRISH,
SUBLANG_IRISH_IRELAND),
SORT_DEFAULT) },
2690 { {
'i',
't',0}, {
'i',
't',
'-',
'I',
'T',0},
MAKELCID(
MAKELANGID(
LANG_ITALIAN,
SUBLANG_ITALIAN),
SORT_DEFAULT) },
2691 { {
'm',
's',0}, {
'm',
's',
'-',
'M',
'Y',0},
MAKELCID(
MAKELANGID(
LANG_MALAY,
SUBLANG_MALAY_MALAYSIA),
SORT_DEFAULT) },
2692 { {
'n',
'l',0}, {
'n',
'l',
'-',
'N',
'L',0},
MAKELCID(
MAKELANGID(
LANG_DUTCH,
SUBLANG_DUTCH),
SORT_DEFAULT) },
2693 { {
'p',
't',0}, {
'p',
't',
'-',
'B',
'R',0},
MAKELCID(
MAKELANGID(
LANG_PORTUGUESE,
SUBLANG_PORTUGUESE_BRAZILIAN),
SORT_DEFAULT) },
2694 { {
's',
'r',0}, {
's',
'r',
'-',
'L',
'a',
't',
'n',
'-',
'R',
'S',0},
MAKELCID(
MAKELANGID(
LANG_SERBIAN,
SUBLANG_SERBIAN_SERBIA_LATIN),
SORT_DEFAULT), 1 },
2695 { {
's',
'v',0}, {
's',
'v',
'-',
'S',
'E',0},
MAKELCID(
MAKELANGID(
LANG_SWEDISH,
SUBLANG_SWEDISH),
SORT_DEFAULT) },
2696 { {
'u',
'z',0}, {
'u',
'z',
'-',
'L',
'a',
't',
'n',
'-',
'U',
'Z',0},
MAKELCID(
MAKELANGID(
LANG_UZBEK,
SUBLANG_UZBEK_LATIN),
SORT_DEFAULT) },
2697 { {
'z',
'h',0}, {
'z',
'h',
'-',
'C',
'N',0},
MAKELCID(
MAKELANGID(
LANG_CHINESE,
SUBLANG_CHINESE_SIMPLIFIED),
SORT_DEFAULT) },
2706 static const WCHAR enW[] = {
'e',
'n',0};
2707 static const WCHAR esesW[] = {
'e',
's',
'-',
'e',
's',0};
2708 static const WCHAR zhHansW[] = {
'z',
'h',
'-',
'H',
'a',
'n',
's',0};
2709 static const WCHAR zhhansW[] = {
'z',
'h',
'-',
'h',
'a',
'n',
's',0};
2710 static const WCHAR zhHantW[] = {
'z',
'h',
'-',
'H',
'a',
'n',
't',0};
2711 static const WCHAR zhhantW[] = {
'z',
'h',
'-',
'h',
'a',
'n',
't',0};
2712 static const WCHAR zhcnW[] = {
'z',
'h',
'-',
'C',
'N',0};
2713 static const WCHAR zhhkW[] = {
'z',
'h',
'-',
'H',
'K',0};
2715 if (!pLocaleNameToLCID)
2717 win_skip(
"LocaleNameToLCID not available\n" );
2733 lcid = pLocaleNameToLCID(LOCALE_NAME_SYSTEM_DEFAULT, 0);
2742 lcid = pLocaleNameToLCID(LOCALE_NAME_INVARIANT, 0);
2755 lcid = pLocaleNameToLCID(esesW, 0);
2759 lcid = pLocaleNameToLCID(enW, 0);
2768 lcid = pLocaleNameToLCID(
ptr->name, 0);
2770 ok(
lcid ==
ptr->lcid,
"%s: got wrong lcid 0x%04x, expected 0x%04x\n",
2783 lcid = pLocaleNameToLCID(zhHantW, 0);
2797 lcid = pLocaleNameToLCID(zhhantW, 0);
2806 lcid = pLocaleNameToLCID(zhHansW, 0);
2821 lcid = pLocaleNameToLCID(zhhansW, 0);
2898 const char *
s1 = *(
const char *
const *)e1;
2899 const char *
s2 = *(
const char *
const *)e2;
2906 const char *
s1 = *(
const char *
const *)e1;
2907 const char *
s2 = *(
const char *
const *)e2;
2914 const char *
s1 = *(
const char *
const *)e1;
2915 const char *
s2 = *(
const char *
const *)e2;
2916 char key1[256], key2[256];
2937 "qsort using lstrcmpA failed for element %d\n",
i);
2945 "qsort using CompareStringA failed for element %d\n",
i);
2953 "qsort using sort keys failed for element %d\n",
i);
2962 static const char digits_src[] = { 0xB9,0xB2,0xB3,
'\0' };
2963 static const char digits_dst[] = {
'1',
'2',
'3',
'\0' };
2964 static const char composite_src[] =
2966 0x8a,0x8e,0x9a,0x9e,0x9f,0xc0,0xc1,0xc2,
2967 0xc3,0xc4,0xc5,0xc7,0xc8,0xc9,0xca,0xcb,
2968 0xcc,0xcd,0xce,0xcf,0xd1,0xd2,0xd3,0xd4,
2969 0xd5,0xd6,0xd8,0xd9,0xda,0xdb,0xdc,0xdd,
2970 0xe0,0xe1,0xe2,0xe3,0xe4,0xe5,0xe7,0xe8,
2971 0xe9,0xea,0xeb,0xec,0xed,0xee,0xef,0xf1,
2972 0xf2,0xf3,0xf4,0xf5,0xf6,0xf8,0xf9,0xfa,
2973 0xfb,0xfc,0xfd,0xff,
'\0'
2975 static const char composite_dst[] =
2977 0x53,0x3f,0x5a,0x3f,0x73,0x3f,0x7a,0x3f,
2978 0x59,0xa8,0x41,0x60,0x41,0xb4,0x41,0x5e,
2979 0x41,0x7e,0x41,0xa8,0x41,0xb0,0x43,0xb8,
2980 0x45,0x60,0x45,0xb4,0x45,0x5e,0x45,0xa8,
2981 0x49,0x60,0x49,0xb4,0x49,0x5e,0x49,0xa8,
2982 0x4e,0x7e,0x4f,0x60,0x4f,0xb4,0x4f,0x5e,
2983 0x4f,0x7e,0x4f,0xa8,0x4f,0x3f,0x55,0x60,
2984 0x55,0xb4,0x55,0x5e,0x55,0xa8,0x59,0xb4,
2985 0x61,0x60,0x61,0xb4,0x61,0x5e,0x61,0x7e,
2986 0x61,0xa8,0x61,0xb0,0x63,0xb8,0x65,0x60,
2987 0x65,0xb4,0x65,0x5e,0x65,0xa8,0x69,0x60,
2988 0x69,0xb4,0x69,0x5e,0x69,0xa8,0x6e,0x7e,
2989 0x6f,0x60,0x6f,0xb4,0x6f,0x5e,0x6f,0x7e,
2990 0x6f,0xa8,0x6f,0x3f,0x75,0x60,0x75,0xb4,
2991 0x75,0x5e,0x75,0xa8,0x79,0xb4,0x79,0xa8,
'\0'
2993 static const char composite_dst_alt[] =
2995 0x53,0x3f,0x5a,0x3f,0x73,0x3f,0x7a,0x3f,
2996 0x59,0xa8,0x41,0x60,0x41,0xb4,0x41,0x5e,
2997 0x41,0x7e,0x41,0xa8,0x41,0xb0,0x43,0xb8,
2998 0x45,0x60,0x45,0xb4,0x45,0x5e,0x45,0xa8,
2999 0x49,0x60,0x49,0xb4,0x49,0x5e,0x49,0xa8,
3000 0x4e,0x7e,0x4f,0x60,0x4f,0xb4,0x4f,0x5e,
3001 0x4f,0x7e,0x4f,0xa8,0xd8,0x55,0x60,0x55,
3002 0xb4,0x55,0x5e,0x55,0xa8,0x59,0xb4,0x61,
3003 0x60,0x61,0xb4,0x61,0x5e,0x61,0x7e,0x61,
3004 0xa8,0x61,0xb0,0x63,0xb8,0x65,0x60,0x65,
3005 0xb4,0x65,0x5e,0x65,0xa8,0x69,0x60,0x69,
3006 0xb4,0x69,0x5e,0x69,0xa8,0x6e,0x7e,0x6f,
3007 0x60,0x6f,0xb4,0x6f,0x5e,0x6f,0x7e,0x6f,
3008 0xa8,0xf8,0x75,0x60,0x75,0xb4,0x75,0x5e,
3009 0x75,0xa8,0x79,0xb4,0x79,0xa8,
'\0'
3011 static const char ligatures_src[] =
3013 0x8C,0x9C,0xC6,0xDE,0xDF,0xE6,0xFE,
'\0'
3015 static const char ligatures_dst[] =
3017 'O',
'E',
'o',
'e',
'A',
'E',
'T',
'H',
's',
's',
'a',
'e',
't',
'h',
'\0'
3019 static const struct special
3023 } foldczone_special[] =
3026 { 0x85, { 0x2e, 0x2e, 0x2e, 0x00 } },
3027 { 0x98, { 0x20, 0x7e, 0x00 } },
3028 { 0x99, { 0x54, 0x4d, 0x00 } },
3029 { 0xa0, { 0x20, 0x00 } },
3030 { 0xa8, { 0x20, 0xa8, 0x00 } },
3031 { 0xaa, { 0x61, 0x00 } },
3032 { 0xaf, { 0x20, 0xaf, 0x00 } },
3033 { 0xb2, { 0x32, 0x00 } },
3034 { 0xb3, { 0x33, 0x00 } },
3035 { 0xb4, { 0x20, 0xb4, 0x00 } },
3036 { 0xb8, { 0x20, 0xb8, 0x00 } },
3037 { 0xb9, { 0x31, 0x00 } },
3038 { 0xba, { 0x6f, 0x00 } },
3039 { 0xbc, { 0x31, 0x2f, 0x34, 0x00 } },
3040 { 0xbd, { 0x31, 0x2f, 0x32, 0x00 } },
3041 { 0xbe, { 0x33, 0x2f, 0x34, 0x00 } },
3051 trace(
"Skipping FoldStringA tests for a not Latin 1 locale\n");
3060 win_skip(
"FoldStringA is not implemented\n");
3065 "MAP_FOLDDIGITS: Expected '%s', got '%s'\n", digits_dst,
dst);
3066 for (
i = 1;
i < 256;
i++)
3076 "MAP_FOLDDIGITS: Expected '%s', got '%s'\n",
src,
dst);
3082 ret = pFoldStringA(MAP_EXPAND_LIGATURES, ligatures_src, -1,
dst, 256);
3087 "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n", ligatures_dst,
dst);
3088 for (
i = 1;
i < 256;
i++)
3090 if (!
strchr(ligatures_src,
i))
3095 ret = pFoldStringA(MAP_EXPAND_LIGATURES,
src, -1,
dst, 256);
3101 "Got %s for %d\n",
dst,
i);
3107 "MAP_EXPAND_LIGATURES: Expected '%s', got '%s'\n",
src,
dst);
3117 ok(
ret == 121 ||
ret == 119,
"Expected 121 or 119, got %d\n",
ret);
3119 "MAP_COMPOSITE: Mismatch, got '%s'\n",
dst);
3121 for (
i = 1;
i < 256;
i++)
3123 if (!
strchr(composite_src,
i))
3131 "0x%02x, 0x%02x,0x%02x,0x%02x,\n", (
unsigned char)
src[0],
3132 (
unsigned char)
dst[0],(
unsigned char)
dst[1],(
unsigned char)
dst[2]);
3137 for (
i = 1;
i < 256;
i++)
3144 for (
j = 0; foldczone_special[
j].src != 0 && ! is_special;
j++)
3146 if (foldczone_special[
j].
src ==
src[0])
3149 "Expected ret == 2 or %d, got %d, error %d\n",
3152 "MAP_FOLDCZONE: string mismatch for 0x%02x\n",
3153 (
unsigned char)
src[0]);
3161 "MAP_FOLDCZONE: Expected 0x%02x, got 0x%02x\n",
3162 (
unsigned char)
src[0], (
unsigned char)
dst[0]);
3167 for (
i = 1;
i < 256;
i++)
3175 "MAP_PRECOMPOSED: Expected 0x%02x, got 0x%02x\n",
3176 (
unsigned char)
src[0], (
unsigned char)
dst[0]);
3185 static const DWORD badFlags[] =
3193 static const WCHAR digitRanges[] =
3247 static const WCHAR outOfSequenceDigits[] =
3267 static const WCHAR noDigitAvailable[] =
3281 static const WCHAR foldczone_src[] =
3283 'W',
'i',
'n',
'e', 0x0348, 0x0551, 0x1323, 0x280d,
3284 0xff37, 0xff49, 0xff4e, 0xff45,
'\0'
3286 static const WCHAR foldczone_dst[] =
3288 'W',
'i',
'n',
'e',0x0348,0x0551,0x1323,0x280d,
'W',
'i',
'n',
'e',
'\0'
3290 static const WCHAR foldczone_todo_src[] =
3292 0x3c5,0x308,0x6a,0x30c,0xa0,0xaa,0
3294 static const WCHAR foldczone_todo_dst[] =
3296 0x3cb,0x1f0,
' ',
'a',0
3298 static const WCHAR foldczone_todo_broken_dst[] =
3300 0x3cb,0x1f0,0xa0,0xaa,0
3302 static const WCHAR ligatures_src[] =
3304 'W',
'i',
'n',
'e', 0x03a6, 0x03b9, 0x03bd, 0x03b5,
3305 0x00c6, 0x00de, 0x00df, 0x00e6, 0x00fe, 0x0132, 0x0133, 0x0152,
3306 0x0153, 0x01c4, 0x01c5, 0x01c6, 0x01c7, 0x01c8, 0x01c9, 0x01ca,
3307 0x01cb, 0x01cc, 0x01e2, 0x01e3, 0x01f1, 0x01f2, 0x01f3, 0x01fc,
3308 0x01fd, 0x05f0, 0x05f1, 0x05f2, 0xfb00, 0xfb01, 0xfb02, 0xfb03,
3309 0xfb04, 0xfb05, 0xfb06,
'\0'
3311 static const WCHAR ligatures_dst[] =
3313 'W',
'i',
'n',
'e',0x03a6,0x03b9,0x03bd,0x03b5,
3314 'A',
'E',
'T',
'H',
's',
's',
'a',
'e',
't',
'h',
'I',
'J',
'i',
'j',
'O',
'E',
'o',
'e',
3315 'D',0x017d,
'D',0x017e,
'd',0x017e,
'L',
'J',
'L',
'j',
'l',
'j',
'N',
'J',
'N',
'j',
3316 'n',
'j',0x0100,0x0112,0x0101,0x0113,
'D',
'Z',
'D',
'z',
'd',
'z',0x00c1,0x00c9,
3317 0x00e1,0x00e9,0x05d5,0x05d5,0x05d5,0x05d9,0x05d9,0x05d9,
'f',
'f',
'f',
'i',
3318 'f',
'l',
'f',
'f',
'i',
'f',
'f',
'l',0x017f,
't',
's',
't',
'\0'
3323 win_skip(
"FoldStringW is not available\n");
3328 for (
i = 0;
i <
sizeof(badFlags)/
sizeof(badFlags[0]);
i++)
3332 ret = pFoldStringW(badFlags[
i],
src, 256,
dst, 256);
3335 win_skip(
"FoldStringW is not implemented\n");
3339 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
3346 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3352 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3358 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3364 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3373 ok(
dst[0] ==
'A' &&
dst[1] ==
'\0',
3374 "srclen=-1: Expected ret=2 [%d,%d], got ret=%d [%d,%d], err=%d\n",
3386 "srclen=1: Expected ret=1, [%d,%d], got ret=%d,[%d,%d], err=%d\n",
3390 for (
j = 0;
j <
sizeof(digitRanges)/
sizeof(digitRanges[0]);
j++)
3393 for (ch = prev_ch; ch < digitRanges[
j]; ch++)
3402 (ch >= 0xa8e0 && ch <= 0xa8e9),
3403 "MAP_FOLDDIGITS: ch 0x%04x Expected unchanged got %04x\n", ch,
dst[0]);
3405 broken( ch >= 0xbf0 && ch <= 0xbf2 ),
3406 "char %04x should not be a digit\n", ch );
3409 if (digitRanges[
j] == 0xffff)
3412 for (ch = digitRanges[
j]; ch < digitRanges[
j] + 10; ch++)
3417 if (ch == 0x2071)
c = 0x00B9;
3418 else if (ch == 0x2072)
c = 0x00B2;
3419 else if (ch == 0x2073)
c = 0x00B3;
3420 else if (ch == 0x245F)
c = 0x24EA;
3428 ok((
dst[0] ==
'0' + ch - digitRanges[
j] &&
dst[1] ==
'\0') ||
3430 (digitRanges[
j] == 0x3020 &&
dst[0] == ch) ||
3431 (digitRanges[
j] == 0x0F29 &&
dst[0] == ch) ||
3433 "MAP_FOLDDIGITS: ch %04x Expected %04x got %04x\n",
3434 ch,
'0' + digitRanges[
j] - ch,
dst[0]);
3442 ok(
ret ==
sizeof(foldczone_dst)/
sizeof(foldczone_dst[0]),
3444 ok(!
memcmp(
dst, foldczone_dst,
sizeof(foldczone_dst)),
3445 "MAP_FOLDCZONE: Expanded incorrectly\n");
3448 todo_wine ok(
ret ==
sizeof(foldczone_todo_dst)/
sizeof(foldczone_todo_dst[0]),
3451 ||
broken(!
memcmp(
dst, foldczone_todo_broken_dst,
sizeof(foldczone_todo_broken_dst))),
3456 ret = pFoldStringW(MAP_EXPAND_LIGATURES, ligatures_src, -1,
dst, 256);
3459 ok(
ret ==
sizeof(ligatures_dst)/
sizeof(ligatures_dst[0]),
3461 ok(!
memcmp(
dst, ligatures_dst,
sizeof(ligatures_dst)),
3462 "MAP_EXPAND_LIGATURES: Expanded incorrectly\n");
3471 ok(lcid == l, "Expected lcid = %08x, got %08x\n", l, lcid)
3472#define MKLCID(x,y,z) MAKELCID(MAKELANGID(x, y), z)
3473#define LCID_RES(src, res) lcid = ConvertDefaultLocale(src); LCID_OK(res)
3474#define TEST_LCIDLANG(a,b) LCID_RES(MAKELCID(a,b), MAKELCID(a,b))
3475#define TEST_LCID(a,b,c) LCID_RES(MKLCID(a,b,c), MKLCID(a,b,c))
3513 trace(
"%08x, %s, %s, %08x, %08lx\n",
3517 "Enumerated grp %d not valid (flags %d)\n", lgrpid,
dwFlags);
3521 "Expected dwFlags == LGRPID_INSTALLED || dwFlags == LGRPID_SUPPORTED, got %d\n",
dwFlags);
3530 if (!pEnumSystemLanguageGroupsA || !pIsValidLanguageGroup)
3532 win_skip(
"EnumSystemLanguageGroupsA and/or IsValidLanguageGroup are not available\n");
3541 win_skip(
"EnumSystemLanguageGroupsA is not implemented\n");
3545 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3572 if (!pEnumSystemLocalesEx)
3574 win_skip(
"EnumSystemLocalesEx not available\n" );
3579 ok( !
ret,
"should have failed\n" );
3590 trace(
"%08x, %08x, %s, %08lx\n", lgrpid, lcid, lpszNum,
lParam);
3597 "Enumerated grp %d not valid\n", lgrpid);
3599 "Enumerated grp locale %04x not valid\n", lcid);
3607 if (!pEnumLanguageGroupLocalesA || !pIsValidLanguageGroup)
3609 win_skip(
"EnumLanguageGroupLocalesA and/or IsValidLanguageGroup are not available\n");
3618 win_skip(
"EnumLanguageGroupLocalesA is not implemented\n");
3622 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3628 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3634 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3640 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3654 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3660 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
3666 "Expected ERROR_INVALID_FLAGS, got %d\n",
GetLastError());
3678 ok(!
enumCount,
"callback called again unexpected\n");
3685 ok(0,
"callback called unexpected\n");
3692 if (!pEnumUILanguagesA) {
3693 win_skip(
"EnumUILanguagesA is not available on Win9x or NT4\n");
3701 win_skip(
"EnumUILanguagesA is not implemented\n");
3712 ret = pEnumUILanguagesA(
NULL, 0, 0);
3713 ok(!
ret,
"Expected return value FALSE, got %u\n",
ret);
3715 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3719 ok(!
ret,
"Expected return value FALSE, got %u\n",
ret);
3723 ret = pEnumUILanguagesA(
NULL, 0x5a5a5a5a, 0);
3724 ok(!
ret,
"Expected return value FALSE, got %u\n",
ret);
3726 "Expected ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
3756 win_skip(
"0 for dwFlags is not supported\n");
3774 win_skip(
"LOCALE_USE_CP_ACP is not supported\n");
3812 win_skip(
"DATE_YEARMONTH is only present on W2K and later\n");
3878 win_skip(
"EnumTimeFormatsW doesn't support TIME_NOSECONDS\n");
3910 ok(!
ret,
"GetCPInfo(CP_SYMBOL) should fail\n");
3912 "expected ERROR_INVALID_PARAMETER, got %u\n",
GetLastError());
3918 win_skip(
"Codepage CP_UTF7 is not installed/available\n");
3934 win_skip(
"Codepage CP_UTF8 is not installed/available\n");
3957 static const WCHAR blanks[] = {0x9, 0x20, 0xa0, 0x3000, 0xfeff};
3969 static const WCHAR undefined[] = {0x378, 0x379, 0x5ff, 0xfff8, 0xfffe};
3972 static const WCHAR alpha[] = {0x47, 0x67, 0x1c5};
3979 static const WCHAR oldpunc[] = { 0x2c2, 0x2e5, 0x322, 0x482, 0x6de,
3981 0xffe0, 0xffe9, 0x2153};
3984 static const WCHAR changed[] = {0x2b0, 0x2160, 0x600, 0xad, 0x1f88, 0x294, 0x903};
4002 static const WCHAR punct[] = { 0x5f, 0x2d, 0x28, 0x29, 0xab, 0xbb, 0x21 };
4004 static const WCHAR punct_special[] = {0x24, 0x2b, 0x3c, 0x3e, 0x5e, 0x60,
4005 0x7c, 0x7e, 0xa2, 0xbe, 0xd7, 0xf7};
4006 static const WCHAR digit_special[] = {0xb2, 0xb3, 0xb9};
4007 static const WCHAR lower_special[] = {0x2071, 0x207f};
4008 static const WCHAR cntrl_special[] = {0x070f, 0x200c, 0x200d,
4009 0x200e, 0x200f, 0x202a, 0x202b, 0x202c, 0x202d, 0x202e,
4010 0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, 0xfeff,
4011 0xfff9, 0xfffa, 0xfffb};
4012 static const WCHAR space_special[] = {0x09, 0x0d, 0x85};
4037 for (
i = 0;
i < 5;
i++)
4042 for (
i = 0;
i < 3;
i++)
4046 for (
i = 0;
i < 5;
i++)
4051 for (
i = 0;
i < 8;
i++)
4056 for (
i = 0;
i < 7;
i++)
4061 for (
i = 0;
i < 7;
i++)
4067 for (
i = 0;
i < 12;
i++)
4072 for (
i = 0;
i < 3;
i++)
4077 for (
i = 0;
i < 2;
i++)
4082 for (
i = 0;
i < 20;
i++)
4087 for (
i = 0;
i < 3;
i++)
4095 win_skip(
"C3_HIGHSURROGATE/C3_LOWSURROGATE are not supported.\n");
4114 for (ch[0] = 0x600; ch[0] <= 0x6ff; ch[0] += 1)
4118 ok(
ret,
"%#x: failed %d\n", ch[0],
ret);
4139 5, {
't',
'e',
's',
't',0},
4140 5, 5, {
't',
'e',
's',
't',0},
4144 3, {
'a',0xe111,
'b'},
4164 6, {
' ',
'-',
'/',
'[',
']',0},
4165 6, 6, {
' ',
'-',
'/',
'[',
']',0},
4170 3, 3, {
'a',
'-',
'a'},
4171 IDN_USE_STD3_ASCII_RULES, 0xdeadbeef
4179 10, {
'T',0xdf,0x130,0x143,0x37a,0x6a,0x30c,
' ',0xaa,0},
4180 12, 12, {
't',
's',
's',
'i',0x307,0x144,
' ',0x3b9,0x1f0,
' ',
'a',0},
4184 11, {
't',0xad,0x34f,0x1806,0x180b,0x180c,0x180d,0x200b,0x200c,0x200d,0},
4201 IDN_ALLOW_UNASSIGNED, 0xdeadbeef
4204 5, {
'a',
'.',
'.',
'a',0},
4218 if (!pIdnToNameprepUnicode)
4220 win_skip(
"IdnToNameprepUnicode is not available\n");
4240 ok(
err == 0xdeadbeef,
"err = %d\n",
err);
4256 ret = pIdnToNameprepUnicode(IDN_ALLOW_UNASSIGNED|IDN_USE_STD3_ASCII_RULES,
4304 5, {
'T',
'e',
's',
't',0},
4305 5, {
'T',
'e',
's',
't',0},
4309 5, {
'T',
'e',0x017c,
's',
't',0},
4310 12, {
'x',
'n',
'-',
'-',
't',
'e',
's',
't',
'-',
'c',
'b',
'b',0},
4314 12, {
't',
'e',0x0105,
's',
't',
'.',
't',
'e',0x017c,
's',
't',0},
4315 26, {
'x',
'n',
'-',
'-',
't',
'e',
's',
't',
'-',
'c',
't',
'a',
'.',
'x',
'n',
'-',
'-',
't',
'e',
's',
't',
'-',
'c',
'b',
'b',0},
4320 9, {
'x',
'n',
'-',
'-',
'2',
'd',
'a',
'.',0},
4324 10, {
'h',
't',
't',
'p',
':',
'/',
'/',
't',0x0106,0},
4325 17, {
'x',
'n',
'-',
'-',
'h',
't',
't',
'p',
':',
'/',
'/',
't',
'-',
'7',
'8',
'a',0},
4329 10, {0x4e3a,0x8bf4,0x4e0d,0x4ed6,0x5011,0x10d,0x11b,0x305c,0x306a,0},
4330 35, {
'x',
'n',
'-',
'-',
'b',
'e',
'a',
'2',
'a',
'1',
'6',
'3',
'1',
'a',
'v',
'b',
'a',
4331 'v',
'4',
'4',
't',
'y',
'h',
'a',
'3',
'2',
'b',
'9',
'1',
'e',
'g',
's',
'2',
't',0},
4336 8, {
'x',
'n',
'-',
'-',
'6',
'l',
'a',0},
4337 IDN_ALLOW_UNASSIGNED, 0xdeadbeef
4346 win_skip(
"IdnToAscii is not available\n");
4374 5, {
'T',
'e',
's',
'.',0},
4375 5, {
'T',
'e',
's',
'.',0},
4384 33, {
'x',
'n',
'-',
'-',
'4',
'd',
'b',
'c',
'a',
'g',
'd',
'a',
'h',
'y',
'm',
'b',
4385 'x',
'e',
'k',
'h',
'e',
'h',
'6',
'e',
'0',
'a',
'7',
'f',
'e',
'i',
'0',
'b',0},
4386 23, {0x05dc,0x05de,0x05d4,0x05d4,0x05dd,0x05e4,0x05e9,0x05d5,0x05d8,
4387 0x05dc,0x05d0,0x05de,0x05d3,0x05d1,0x05e8,0x05d9,0x05dd,0x05e2,
4388 0x05d1,0x05e8,0x05d9,0x05ea,0},
4392 34, {
't',
'e',
's',
't',
'.',
'x',
'n',
'-',
'-',
'k',
'd',
'a',
'9',
'a',
'g',
'5',
'e',
4393 '9',
'j',
'n',
'f',
's',
'j',
'.',
'x',
'n',
'-',
'-',
'p',
'd',
'-',
'f',
'n',
'a'},
4394 16, {
't',
'e',
's',
't',
'.',0x0105,0x0119,0x015b,0x0107,
4395 0x0142,0x00f3,0x017c,
'.',
'p',0x0119,
'd'},
4399 64, {
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
4400 'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
4401 'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
4402 'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a',
'a'},
4407 8, {
'x',
'n',
'-',
'-',
'6',
'l',
'a',0},
4409 IDN_ALLOW_UNASSIGNED, 0xdeadbeef
4418 win_skip(
"IdnToUnicode is not available\n");
4441 static const WCHAR enW[] = {
'e',
'n',0};
4442 WCHAR bufferW[80], buffer2[80];
4445 if (!pGetLocaleInfoEx)
4447 win_skip(
"GetLocaleInfoEx not supported\n");
4455 static const WCHAR statesW[] = {
'U',
'n',
'i',
't',
'e',
'd',
' ',
'S',
't',
'a',
't',
'e',
's',0};
4456 static const WCHAR dummyW[] = {
'd',
'u',
'm',
'm',
'y',0};
4457 static const WCHAR enusW[] = {
'e',
'n',
'-',
'U',
'S',0};
4458 static const WCHAR usaW[] = {
'U',
'S',
'A',0};
4459 static const WCHAR enuW[] = {
'E',
'N',
'U',0};
4486 ret = pGetLocaleInfoEx(enusW, LOCALE_SPARENT, bufferW,
sizeof(bufferW)/
sizeof(
WCHAR));
4490 ret = pGetLocaleInfoEx(enW, LOCALE_SPARENT, bufferW,
sizeof(bufferW)/
sizeof(
WCHAR));
4499 skip(
"Non-English locale\n");
4532 static const WCHAR enusW[] = {
'e',
'n',
'-',
'U',
'S',0};
4533 static const WCHAR zzW[] = {
'z',
'z',0};
4534 static const WCHAR zz_zzW[] = {
'z',
'z',
'-',
'Z',
'Z',0};
4535 static const WCHAR zzzzW[] = {
'z',
'z',
'z',
'z',0};
4538 if (!pIsValidLocaleName)
4540 win_skip(
"IsValidLocaleName not supported\n");
4544 ret = pIsValidLocaleName(enusW);
4545 ok(
ret,
"IsValidLocaleName failed\n");
4546 ret = pIsValidLocaleName(zzW);
4547 ok(!
ret ||
broken(
ret),
"IsValidLocaleName should have failed\n");
4548 ret = pIsValidLocaleName(zz_zzW);
4549 ok(!
ret ||
broken(
ret),
"IsValidLocaleName should have failed\n");
4550 ret = pIsValidLocaleName(zzzzW);
4551 ok(!
ret,
"IsValidLocaleName should have failed\n");
4552 ret = pIsValidLocaleName(LOCALE_NAME_INVARIANT);
4553 ok(
ret,
"IsValidLocaleName failed\n");
4554 ret = pIsValidLocaleName(
NULL);
4555 ok(!
ret,
"IsValidLocaleName should have failed\n");
4564 WCHAR null1[] = {
'a',0,
'a',0 };
4565 WCHAR null2[] = {
'a',0,
'b',0 };
4566 WCHAR bills1[] = {
'b',
'i',
'l',
'l',
'\'',
's',0 };
4567 WCHAR bills2[] = {
'b',
'i',
'l',
'l',
's',0 };
4568 WCHAR coop1[] = {
'c',
'o',
'-',
'o',
'p',0 };
4569 WCHAR coop2[] = {
'c',
'o',
'o',
'p',0 };
4570 WCHAR nonascii1[] = { 0x0102,0 };
4571 WCHAR nonascii2[] = { 0x0201,0 };
4574 if (!pCompareStringOrdinal)
4576 win_skip(
"CompareStringOrdinal not supported\n");
4583 ok(!
ret,
"Got %u, expected 0\n",
ret);
4587 ok(!
ret,
"Got %u, expected 0\n",
ret);
4591 ok(!
ret,
"Got %u, expected 0\n",
ret);
4611 ret = pCompareStringOrdinal(null1, 3, null2, 3,
FALSE);
4613 ret = pCompareStringOrdinal(null1, 3, null2, 3,
TRUE);
4621 ret = pCompareStringOrdinal(bills1, -1, bills2, -1,
FALSE);
4623 ret = pCompareStringOrdinal(coop2, -1, coop1, -1,
FALSE);
4625 ret = pCompareStringOrdinal(nonascii1, -1, nonascii2, -1,
FALSE);
4627 ret = pCompareStringOrdinal(nonascii1, -1, nonascii2, -1,
TRUE);
4630 for (ch1 = 0; ch1 < 512; ch1++)
4632 for (ch2 = 0; ch2 < 1024; ch2++)
4634 int diff = ch1 - ch2;
4635 ret = pCompareStringOrdinal( &ch1, 1, &ch2, 1,
FALSE );
4637 "wrong result %d %04x %04x\n",
ret, ch1, ch2 );
4638 diff = pRtlUpcaseUnicodeChar( ch1 ) - pRtlUpcaseUnicodeChar( ch2 );
4639 ret = pCompareStringOrdinal( &ch1, 1, &ch2, 1,
TRUE );
4641 "wrong result %d %04x %04x\n",
ret, ch1, ch2 );
4653 win_skip(
"GetGeoInfo is not available.\n");
4671 ok(!
strcmp(buffA,
"RU"),
"got %s\n", buffA);
4678 ok(buffA[0] ==
'a',
"got %c\n", buffA[0]);
4682 ok(!
strcmp(buffA,
"RUS"),
"got %s\n", buffA);
4686 buffA[1] = buffA[2] = 0;
4689 ok(!
strcmp(buffA,
"RU"),
"got %s\n", buffA);
4696 ok(!
strcmp(buffA,
"203"),
"got %s\n", buffA);
4702 win_skip(
"GEO_PARENT not supported.\n");
4706 ok(!
strcmp(buffA,
"47609"),
"got %s\n", buffA);
4712 win_skip(
"GEO_ISO_UN_NUMBER not supported.\n");
4716 ok(!
strcmp(buffA,
"643"),
"got %s\n", buffA);
4730 ok(
ret == 3,
"got %d for %d\n",
ret, geoid);
4732 ok(geoid >= 2,
"got geoid %d\n", geoid);
4747 if (!pEnumSystemGeoID)
4749 win_skip(
"EnumSystemGeoID is not available.\n");
4775 win_skip(
"Parent GEOID is not supported in EnumSystemGeoID.\n");
4782 win_skip(
"GEOCLASS_REGION is not supported in EnumSystemGeoID.\n");
4901 {
X(LOCALE_IDEFAULTEBCDICCODEPAGE),
"037" },
4902 {
X(LOCALE_IPAPERSIZE),
"9" },
4903 {
X(LOCALE_SENGCURRNAME),
"International Monetary Fund" },
4904 {
X(LOCALE_SNATIVECURRNAME),
"International Monetary Fund" },
4905 {
X(LOCALE_SYEARMONTH),
"yyyy MMMM" },
4906 {
X(LOCALE_IDIGITSUBSTITUTION),
"1" },
4908 {
X(LOCALE_SSCRIPTS),
"Latn;" },
4922 win_skip(
"GetLocaleInfoA(LOCALE_INVARIANT) not supported\n");
4935 "For id %d, expected ret == %d, got %d, error %d\n",
4938 "For id %d, Expected %s, got '%s'\n",
4948 skip(
"Non US-English locale\n");
4953 static const char lang[] =
"Invariant Language (Invariant Country)";
4954 static const char cntry[] =
"Invariant Country";
4955 static const char sortm[] =
"Math Alphanumerics";
4956 static const char sortd[] =
"Default";
4974 ok(0,
"Expected ret == %d or %d, got %d, error %d\n",
4986 if (!pGetSystemPreferredUILanguages)
4988 win_skip(
"GetSystemPreferredUILanguages is not available.\n");
4997 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
4998 ok(
count,
"Expected count > 0\n");
4999 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5004 ret = pGetSystemPreferredUILanguages(MUI_FULL_LANGUAGE, &
count,
NULL, &
size);
5005 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5007 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5012 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID | MUI_FULL_LANGUAGE, &
count,
NULL, &
size);
5013 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5015 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5020 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID | MUI_LANGUAGE_NAME, &
count,
NULL, &
size);
5021 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5023 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5028 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS, &
count,
NULL, &
size);
5029 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5030 ok(
count,
"Expected count > 0\n");
5031 ok(
size % 5 == 1,
"Expected size (%d) %% 5 == 1\n",
size);
5036 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_NAME | MUI_MACHINE_LANGUAGE_SETTINGS, &
count,
NULL, &
size);
5037 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5038 ok(
count,
"Expected count > 0\n");
5039 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5050 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &
count,
NULL, &
size);
5051 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5053 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5063 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_ID, &
count,
NULL, &size_id);
5064 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5065 ok(
count,
"Expected count > 0\n");
5066 ok(size_id % 5 == 1,
"Expected size (%d) %% 5 == 1\n", size_id);
5071 ret = pGetSystemPreferredUILanguages(MUI_LANGUAGE_NAME, &
count,
NULL, &size_name);
5072 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5073 ok(
count,
"Expected count > 0\n");
5074 ok(size_name % 6 == 1,
"Expected size (%d) %% 6 == 1\n", size_name);
5076 size_buffer =
max(size_id, size_name);
5079 skip(
"No valid buffer size\n");
5086 skip(
"Failed to allocate memory for %d chars\n", size_buffer);
5095 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5096 ok(
count,
"Expected count > 0\n");
5097 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5100 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5108 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5109 ok(
count,
"Expected count > 0\n");
5110 ok(
size % 5 == 1,
"Expected size (%d) %% 5 == 1\n",
size);
5113 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5120 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5121 ok(
count,
"Expected count > 0\n");
5122 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5125 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5131 ret = pGetSystemPreferredUILanguages(MUI_MACHINE_LANGUAGE_SETTINGS, &
count,
NULL, &
size);
5132 ok(
ret,
"Expected GetSystemPreferredUILanguages to succeed\n");
5133 ok(
count,
"Expected count > 0\n");
5134 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5137 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5144 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5146 "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
5153 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5155 "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
5162 ok(!
ret,
"Expected GetSystemPreferredUILanguages to fail\n");
5164 "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
5175 if (!pGetThreadPreferredUILanguages)
5177 win_skip(
"GetThreadPreferredUILanguages is not available.\n");
5182 ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID|MUI_UI_FALLBACK, &
count,
NULL, &
size);
5184 ok(
count,
"expected count > 0\n");
5185 ok(
size,
"expected size > 0\n");
5189 ret = pGetThreadPreferredUILanguages(MUI_LANGUAGE_ID|MUI_UI_FALLBACK, &
count,
buf, &
size);
5191 ok(
count,
"expected count > 0\n");
5202 if (!pGetUserPreferredUILanguages)
5204 win_skip(
"GetUserPreferredUILanguages is not available.\n");
5211 ret = pGetUserPreferredUILanguages(MUI_FULL_LANGUAGE, &
count,
NULL, &
size);
5212 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5214 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5219 ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID | MUI_FULL_LANGUAGE, &
count,
NULL, &
size);
5220 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5222 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5227 ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID | MUI_MACHINE_LANGUAGE_SETTINGS, &
count,
NULL, &
size);
5228 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5230 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5236 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5238 "Expected error ERROR_INVALID_PARAMETER, got %d\n",
GetLastError());
5243 ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_ID, &
count,
NULL, &size_id);
5244 ok(
ret,
"Expected GetUserPreferredUILanguages to succeed\n");
5245 ok(
count,
"Expected count > 0\n");
5246 ok(size_id % 5 == 1,
"Expected size (%d) %% 5 == 1\n", size_id);
5251 ret = pGetUserPreferredUILanguages(MUI_LANGUAGE_NAME, &
count,
NULL, &size_name);
5252 ok(
ret,
"Expected GetUserPreferredUILanguages to succeed\n");
5253 ok(
count,
"Expected count > 0\n");
5254 ok(size_name % 6 == 1,
"Expected size (%d) %% 6 == 1\n", size_name);
5256 size_buffer =
max(size_id, size_name);
5259 skip(
"No valid buffer size\n");
5270 ok(
ret,
"Expected GetUserPreferredUILanguages to succeed\n");
5271 ok(
count,
"Expected count > 0\n");
5272 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5275 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5283 ok(
ret,
"Expected GetUserPreferredUILanguages to succeed\n");
5284 ok(
count,
"Expected count > 0\n");
5285 ok(
size % 5 == 1,
"Expected size (%d) %% 5 == 1\n",
size);
5288 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5295 ok(
ret,
"Expected GetUserPreferredUILanguages to succeed\n");
5296 ok(
count,
"Expected count > 0\n");
5297 ok(
size % 6 == 1,
"Expected size (%d) %% 6 == 1\n",
size);
5300 "Expected last two WCHARs being empty, got 0x%x 0x%x\n",
5307 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5309 "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
5316 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5318 "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
5325 ok(!
ret,
"Expected GetUserPreferredUILanguages to fail\n");
5327 "Expected error ERROR_INSUFFICIENT_BUFFER, got %d\n",
GetLastError());
std::map< E_MODULE, HMODULE > mod
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)
void __cdecl qsort(_Inout_updates_bytes_(_NumOfElements *_SizeOfElements) void *_Base, _In_ size_t _NumOfElements, _In_ size_t _SizeOfElements, _In_ int(__cdecl *_PtFuncCompare)(const void *, const void *))
#define ERROR_INSUFFICIENT_BUFFER
#define ERROR_CALL_NOT_IMPLEMENTED
#define ERROR_INVALID_PARAMETER
#define HeapFree(x, y, z)
#define MultiByteToWideChar
#define ERROR_INVALID_NAME
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
#define LOCALE_NAME_USER_DEFAULT
LCID WINAPI GetThreadLocale(void)
INT WINAPI LCMapStringA(LCID lcid, DWORD flags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)
BOOL WINAPI IsValidLanguageGroup(LGRPID lgrpid, DWORD dwFlags)
INT WINAPI FoldStringA(DWORD dwFlags, LPCSTR src, INT srclen, LPSTR dst, INT dstlen)
INT WINAPI CompareStringA(LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
INT WINAPI IdnToUnicode(DWORD dwFlags, LPCWSTR lpASCIICharStr, INT cchASCIIChar, LPWSTR lpUnicodeCharStr, INT cchUnicodeChar)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI CompareStringW(LCID lcid, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2)
BOOL WINAPI GetSystemPreferredUILanguages(DWORD flags, ULONG *count, WCHAR *buffer, ULONG *size)
INT WINAPI GetLocaleInfoA(LCID lcid, LCTYPE lctype, LPSTR buffer, INT len)
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
INT WINAPI GetGeoInfoW(GEOID geoid, GEOTYPE geotype, LPWSTR data, int data_len, LANGID lang)
BOOL WINAPI IsValidLocaleName(LPCWSTR locale)
INT WINAPI IdnToAscii(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, INT cchUnicodeChar, LPWSTR lpASCIICharStr, INT cchASCIIChar)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
INT WINAPI LCMapStringEx(LPCWSTR locale, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM handle)
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
BOOL WINAPI IsValidLocale(LCID lcid, DWORD flags)
INT WINAPI FoldStringW(DWORD dwFlags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
BOOL WINAPI GetThreadPreferredUILanguages(DWORD flags, ULONG *count, WCHAR *buf, ULONG *size)
LCID WINAPI GetUserDefaultLCID(void)
INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, LPCWSTR str2, INT len2, LPNLSVERSIONINFO version, LPVOID reserved, LPARAM lParam)
LCID WINAPI GetSystemDefaultLCID(void)
BOOL WINAPI EnumUILanguagesA(UILANGUAGE_ENUMPROCA pUILangEnumProc, DWORD dwFlags, LONG_PTR lParam)
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
BOOL WINAPI EnumSystemGeoID(GEOCLASS geoclass, GEOID parent, GEO_ENUMPROC enumproc)
BOOL WINAPI EnumLanguageGroupLocalesA(LANGGROUPLOCALE_ENUMPROCA pLangGrpLcEnumProc, LGRPID lgrpid, DWORD dwFlags, LONG_PTR lParam)
BOOL WINAPI EnumSystemLanguageGroupsA(LANGUAGEGROUP_ENUMPROCA pLangGrpEnumProc, DWORD dwFlags, LONG_PTR lParam)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
BOOL WINAPI SetLocaleInfoA(LCID lcid, LCTYPE lctype, LPCSTR data)
INT WINAPI GetGeoInfoA(GEOID geoid, GEOTYPE geotype, LPSTR data, int data_len, LANGID lang)
LCID WINAPI ConvertDefaultLocale(LCID lcid)
BOOL WINAPI EnumSystemLocalesEx(LOCALE_ENUMPROCEX proc, DWORD flags, LPARAM lparam, LPVOID reserved)
INT WINAPI IdnToNameprepUnicode(DWORD dwFlags, LPCWSTR lpUnicodeCharStr, INT cchUnicodeChar, LPWSTR lpNameprepCharStr, INT cchNameprepChar)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const WCHAR month[12][4]
GLuint GLuint GLsizei count
GLuint GLuint GLsizei GLenum type
GLclampf GLclampf GLclampf alpha
GLsizei const GLchar *const * strings
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint64EXT GLuint GLuint GLenum GLenum GLuint GLuint GLenum GLuint GLuint key1
GLboolean GLboolean GLboolean GLboolean a
GLenum GLenum GLenum input
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
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 GLint GLint j
BOOL WINAPI GetUserPreferredUILanguages(DWORD dwFlags, PULONG pulNumLanguages, PZZWSTR pwszLanguagesBuffer, PULONG pcchLanguagesBuffer)
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static int compare_string1(const void *e1, const void *e2)
static void test_EnumSystemLanguageGroupsA(void)
static const char *const strings[]
static void test_LCMapStringW(void)
static void test_ConvertDefaultLocale(void)
static void test_IsValidLocaleName(void)
static void test_SetLocaleInfoA(void)
static void test_CompareStringOrdinal(void)
static void test_sorting(void)
static const WCHAR title_case[]
#define CY_POS_LEFT_SPACE
static BOOL CALLBACK lgrplocale_procA(LGRPID lgrpid, LCID lcid, LPSTR lpszNum, LONG_PTR lParam)
static const WCHAR lower_case[]
static void test_GetTimeFormatA(void)
static BOOL CALLBACK enum_datetime_procW(WCHAR *fmt)
static BOOL CALLBACK test_geoid_enumproc2(GEOID geoid)
static void test_GetThreadPreferredUILanguages(void)
static void test_EnumSystemGeoID(void)
static void test_IdnToUnicode(void)
static const WCHAR invalidW[]
static void test_EnumUILanguageA(void)
static void test_LCMapStringA(void)
INT(* lcmapstring_wrapper)(DWORD, LPCWSTR, INT, LPWSTR, INT)
static void test_CompareStringEx(void)
#define LCID_RES(src, res)
static BOOL CALLBACK enum_func(LPWSTR name, DWORD flags, LPARAM lparam)
static void test_GetCPInfo(void)
static const SYSTEMTIME INT
static void test_GetTimeFormatEx(void)
static void test_GetDateFormatW(void)
static void test_GetLocaleInfoW(void)
static void test_GetCurrencyFormatA(void)
static char date_fmt_buf[1024]
static const WCHAR localeW[]
static void test_EnumDateFormatsA(void)
static void test_GetDateFormatA(void)
static void test_GetUserPreferredUILanguages(void)
static const struct comparestringa_entry comparestringa_data[]
static const DWORD lcmap_invalid_flags[]
static int geoidenum_count
static BOOL CALLBACK enum_datetime_procA(LPSTR fmt)
static void test_invariant(void)
static const WCHAR upper_case[]
static void test_GetGeoInfo(void)
static void test_GetLocaleInfoEx(void)
static INT LCMapStringW_wrapper(DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
static void test_lcmapstring_unicode(lcmapstring_wrapper func_ptr, const char *func_name)
static void test_GetNumberFormatEx(void)
static void test_IdnToAscii(void)
static void test_GetStringTypeW(void)
static BOOL CALLBACK langgrp_procA(LGRPID lgrpid, LPSTR lpszNum, LPSTR lpszName, DWORD dwFlags, LONG_PTR lParam)
static void test_GetDateFormatEx(void)
static BOOL CALLBACK luilocale_proc2A(LPSTR value, LONG_PTR lParam)
static void test_EnumLanguageGroupLocalesA(void)
static const struct comparestringex_test comparestringex_tests[]
static const struct neutralsublang_name2_t neutralsublang_names2[]
static void test_IdnToNameprepUnicode(void)
static void test_LCMapStringEx(void)
static int compare_string2(const void *e1, const void *e2)
static void test_EnumTimeFormatsA(void)
static const WCHAR emptyW[]
static const char *const strings_sorted[]
static const WCHAR fooW[]
static void test_FoldStringA(void)
static INT LCMapStringEx_wrapper(DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
static void test_CompareStringW(void)
static void test_EnumSystemLocalesEx(void)
static WCHAR date_fmt_bufW[1024]
static const WCHAR symbols_stripped[]
static void test_EnumTimeFormatsW(void)
static const SYSTEMTIME LPWSTR
static BOOL CALLBACK luilocale_proc1A(LPSTR value, LONG_PTR lParam)
static const struct neutralsublang_name_t neutralsublang_names[]
static void test_GetNumberFormatA(void)
#define TEST_LCIDLANG(a, b)
static void test_GetSystemPreferredUILanguages(void)
#define TEST_LCID(a, b, c)
static BOOL CALLBACK luilocale_proc3A(LPSTR value, LONG_PTR lParam)
static const struct invariant_entry invariant_list[]
static void test_CompareStringA(void)
static void test_GetLocaleInfoA(void)
static int compare_string3(const void *e1, const void *e2)
static void InitFunctionPointers(void)
#define CY_POS_RIGHT_SPACE
static void test_LocaleNameToLCID(void)
static BOOL CALLBACK test_geoid_enumproc(GEOID geoid)
static void test_FoldStringW(void)
#define todo_wine_if(is_todo)
static DWORD LPDWORD LPCSTR DWORD srclen
static const WCHAR dummyW[]
static const WCHAR dotW[]
WCHAR NTAPI RtlUpcaseUnicodeChar(_In_ WCHAR Source)
#define LOCALE_NAME_MAX_LENGTH
#define SORT_JAPANESE_UNICODE
#define LANG_SYSTEM_DEFAULT
#define LOCALE_USER_DEFAULT
#define LOCALE_SYSTEM_DEFAULT
#define MAKELCID(lgid, srtid)
#define SUBLANG_SERBIAN_SERBIA_LATIN
#define strncmpW(s1, s2, n)
#define SUBLANG_SERBIAN_CROATIA
#define LANG_CHINESE_SIMPLIFIED
#define LANG_CHINESE_TRADITIONAL
#define SUBLANG_ENGLISH_UK
#define SUBLANG_PORTUGUESE_BRAZILIAN
#define SUBLANG_ARABIC_SAUDI_ARABIA
#define SUBLANG_MALAY_MALAYSIA
#define LANGIDFROMLCID(l)
#define SUBLANG_CHINESE_TRADITIONAL
#define SUBLANG_CHINESE_SIMPLIFIED
#define SUBLANG_CHINESE_HONGKONG
#define SUBLANG_SPANISH_MODERN
#define SUBLANG_ENGLISH_US
#define SUBLANG_IRISH_IRELAND
#define SUBLANG_UZBEK_LATIN
#define SUBLANG_AZERI_LATIN
TCHAR str_buf[MAX_LOADSTRING]
BYTE LeadByte[MAX_LEADBYTES]
BYTE DefaultChar[MAX_DEFAULTCHAR]
#define LANG_USER_DEFAULT
static const WCHAR lang[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
BOOL NTAPI VirtualProtect(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flNewProtect, OUT PDWORD lpflOldProtect)
BOOL NTAPI VirtualFree(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD dwFreeType)
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define ERROR_NO_UNICODE_TRANSLATION
#define ERROR_INVALID_FLAGS
#define LOCALE_USE_CP_ACP
#define LOCALE_SABBREVMONTHNAME10
#define LOCALE_SMONTHNAME12
#define LOCALE_ICURRDIGITS
#define LOCALE_IDEFAULTCODEPAGE
#define LOCALE_SMONTHNAME5
#define LOCALE_SABBREVMONTHNAME9
BOOL(CALLBACK * LOCALE_ENUMPROCEX)(LPWSTR, DWORD, LPARAM)
BOOL(CALLBACK * LANGGROUPLOCALE_ENUMPROCA)(LGRPID, LCID, LPSTR, LONG_PTR)
#define LOCALE_SABBREVMONTHNAME11
#define LOCALE_SABBREVDAYNAME5
WINBASEAPI int WINAPI LCIDToLocaleName(_In_ LCID Locale, _Out_writes_opt_(cchName) LPWSTR lpName, _In_ int cchName, _In_ DWORD dwFlags)
#define LOCALE_SABBREVDAYNAME2
#define LOCALE_INEGSEPBYSPACE
#define LOCALE_SABBREVMONTHNAME2
#define LOCALE_INEGSIGNPOSN
#define LOCALE_SMONTHNAME13
#define LOCALE_SMONTHNAME3
#define LOCALE_SSHORTTIME
#define LINGUISTIC_IGNORECASE
#define LCMAP_SIMPLIFIED_CHINESE
#define LOCALE_SMONTHNAME11
#define LOCALE_SMONTHNAME8
#define LCMAP_TRADITIONAL_CHINESE
#define LOCALE_SMONTHNAME4
#define LOCALE_SNATIVECTRYNAME
#define LOCALE_SENGLANGUAGE
#define LOCALE_SABBREVMONTHNAME13
#define LOCALE_IFIRSTWEEKOFYEAR
#define LOCALE_SNATIVELANGNAME
#define LOCALE_SMONTHNAME7
#define NORM_LINGUISTIC_CASING
#define LOCALE_IINTLCURRDIGITS
int WINAPI GetDateFormatEx(LPCWSTR, DWORD, const SYSTEMTIME *, LPCWSTR, LPWSTR, int, LPCWSTR)
#define LOCALE_SSHORTDATE
BOOL(CALLBACK * GEO_ENUMPROC)(GEOID)
#define NORM_IGNORENONSPACE
#define TIME_NOTIMEMARKER
#define TIME_NOMINUTESORSECONDS
#define LOCALE_IPOSSYMPRECEDES
#define LOCALE_SABBREVMONTHNAME4
#define LOCALE_SPOSITIVESIGN
#define NORM_IGNORESYMBOLS
#define LOCALE_IDEFAULTLANGUAGE
#define LOCALE_SABBREVDAYNAME4
#define LOCALE_SMONDECIMALSEP
#define LGRPID_WESTERN_EUROPE
#define LOCALE_SISO639LANGNAME
#define LOCALE_SMONTHNAME1
#define LOCALE_SABBREVMONTHNAME3
#define LOCALE_INEGSYMPRECEDES
#define LOCALE_SMONTHOUSANDSEP
#define LOCALE_IPOSSIGNPOSN
#define LOCALE_SABBREVMONTHNAME1
#define LOCALE_IOPTIONALCALENDAR
#define LOCALE_IDEFAULTANSICODEPAGE
#define LOCALE_SISO3166CTRYNAME
#define LOCALE_SABBREVDAYNAME6
#define LOCALE_SMONTHNAME2
#define LOCALE_STIMEFORMAT
BOOL(CALLBACK * LANGUAGEGROUP_ENUMPROCA)(LGRPID, LPSTR, LPSTR, DWORD, LONG_PTR)
#define LOCALE_SABBREVDAYNAME1
#define LOCALE_IFIRSTDAYOFWEEK
#define LOCALE_SABBREVMONTHNAME6
#define LOCALE_SMONTHNAME6
#define LOCALE_SABBREVLANGNAME
#define LOCALE_SENGCOUNTRY
int WINAPI GetTimeFormatEx(LPCWSTR, DWORD, const SYSTEMTIME *, LPCWSTR, LPWSTR, int)
BOOL(CALLBACK * UILANGUAGE_ENUMPROCA)(LPSTR, LONG_PTR)
#define LOCALE_SABBREVCTRYNAME
#define LOCALE_INEGNUMBER
#define LOCALE_SNEGATIVESIGN
#define LOCALE_IDEFAULTCOUNTRY
#define TIME_FORCE24HOURFORMAT
#define LOCALE_SNATIVEDIGITS
#define LOCALE_SABBREVDAYNAME3
#define LOCALE_SABBREVMONTHNAME5
#define LOCALE_SABBREVMONTHNAME7
#define LOCALE_ICALENDARTYPE
#define LOCALE_SINTLSYMBOL
#define LOCALE_SABBREVMONTHNAME8
#define CSTR_GREATER_THAN
#define LOCALE_SMONGROUPING
#define LOCALE_SMONTHNAME10
#define LOCALE_SMONTHNAME9
#define LOCALE_IPOSSEPBYSPACE
#define LOCALE_SABBREVMONTHNAME12
#define LOCALE_IDEFAULTMACCODEPAGE
#define LOCALE_ITIMEMARKPOSN
#define LOCALE_RETURN_GENITIVE_NAMES
#define LOCALE_SABBREVDAYNAME7