msvcrt: Properly fix setlocale and clean up tests.

This commit is contained in:
Alexandre Goujon 2010-08-30 14:07:30 +02:00 committed by Alexandre Julliard
parent 364559b0ef
commit 2c08a3fbc7
3 changed files with 20 additions and 18 deletions

View File

@ -97,7 +97,7 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
LOCALE_SDECIMAL "."
LOCALE_SENGCOUNTRY "People's Republic of China"
LOCALE_SENGCURRNAME "PRC Yuan Renminbi"
LOCALE_SENGLANGUAGE "Chinese"
LOCALE_SENGLANGUAGE "Chinese (Simplified)"
LOCALE_SGROUPING "3;0"
LOCALE_SINTLSYMBOL "CNY"
LOCALE_SISO3166CTRYNAME "CN"

View File

@ -97,7 +97,7 @@ STRINGTABLE LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_TRADITIONAL
LOCALE_SDECIMAL "."
LOCALE_SENGCOUNTRY "Taiwan"
LOCALE_SENGCURRNAME "New Taiwan Dollar"
LOCALE_SENGLANGUAGE "Chinese"
LOCALE_SENGLANGUAGE "Chinese (Traditional)"
LOCALE_SGROUPING "3;0"
LOCALE_SINTLSYMBOL "TWD"
LOCALE_SISO3166CTRYNAME "TW"

View File

@ -110,32 +110,32 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "chinese");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
|| broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "chinese-simplified");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
|| broken(!strcmp(ret, "Chinese_People's Republic of China.936"))
|| broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "chinese-traditional");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Chinese (Traditional)_Taiwan.950")
ok(!strcmp(ret, "Chinese (Traditional)_Taiwan.950")
|| broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "chs");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
|| broken(!strcmp(ret, "Chinese_People's Republic of China.936")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "cht");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Chinese (Traditional)_Taiwan.950")
ok(!strcmp(ret, "Chinese (Traditional)_Taiwan.950")
|| broken(!strcmp(ret, "Chinese_Taiwan.950")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "csy");
@ -390,12 +390,14 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "italian-swiss");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
ok(!strcmp(ret, "Italian_Switzerland.1252") || broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret);
ok(!strcmp(ret, "Italian_Switzerland.1252")
|| broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "its");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
ok(!strcmp(ret, "Italian_Switzerland.1252") || broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret);
ok(!strcmp(ret, "Italian_Switzerland.1252")
|| broken(!strcmp(ret, "Italian_Italy.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "japanese");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
@ -431,31 +433,31 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "non");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok((!strcmp( ret, "Norwegian-Nynorsk_Norway.1252"))
ok(!strcmp( ret, "Norwegian-Nynorsk_Norway.1252")
|| !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian (Bokmål)_Norway.1252"))
|| broken(!strcmp(ret, "Norwegian_Norway.1252"))
|| broken(!strcmp(ret, "Norwegian (Nynorsk)_Norway.1252")), "ret = %s\n", ret);
|| broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "nor");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
ok(!strcmp(ret, "Norwegian (Bokmål)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian (Bokmal)_Norway.1252"))
|| !strcmp(ret, "Norwegian (Bokmal)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "norwegian-bokmal");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
ok(!strcmp(ret, "Norwegian (Bokmål)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian (Bokmal)_Norway.1252"))
|| !strcmp(ret, "Norwegian (Bokmal)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "norwegian-nynorsk");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252")
ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252")
|| !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252")
|| broken(!strcmp(ret, "Norwegian_Norway.1252"))
|| broken(!strcmp(ret, "Norwegian (Nynorsk)_Norway.1252"))
|| broken(!strcmp(ret, "Norwegian (Bokmal)_Norway.1252"))
|| broken(!strcmp(ret, "Norwegian (Bokmål)_Norway.1252")), "ret = %s\n", ret);
@ -524,8 +526,8 @@ static void test_setlocale(void)
ret = setlocale(LC_ALL, "spanish-modern");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
if(ret)
todo_wine ok(!strcmp(ret, "Spanish - Modern Sort_Spain.1252")
|| broken(!strcmp(ret, "Spanish_Spain.1252")), "ret = %s\n", ret);
ok(!strcmp(ret, "Spanish - Modern Sort_Spain.1252")
|| !strcmp(ret, "Spanish_Spain.1252"), "ret = %s\n", ret);
ret = setlocale(LC_ALL, "sve");
ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");