Alexandre Goujon : msvcrt: Properly fix setlocale and clean up tests.

Alexandre Julliard julliard at winehq.org
Tue Aug 31 11:16:03 CDT 2010


Module: wine
Branch: master
Commit: 2c08a3fbc7b7e4a3d16f1b0025447c2663a77833
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2c08a3fbc7b7e4a3d16f1b0025447c2663a77833

Author: Alexandre Goujon <ale.goujon at gmail.com>
Date:   Mon Aug 30 14:07:30 2010 +0200

msvcrt: Properly fix setlocale and clean up tests.

---

 dlls/kernel32/nls/chs.nls  |    2 +-
 dlls/kernel32/nls/cht.nls  |    2 +-
 dlls/msvcrt/tests/locale.c |   34 ++++++++++++++++++----------------
 3 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/dlls/kernel32/nls/chs.nls b/dlls/kernel32/nls/chs.nls
index c3e7bf8..65cf50c 100644
--- a/dlls/kernel32/nls/chs.nls
+++ b/dlls/kernel32/nls/chs.nls
@@ -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"
diff --git a/dlls/kernel32/nls/cht.nls b/dlls/kernel32/nls/cht.nls
index b99fe42..129cd90 100644
--- a/dlls/kernel32/nls/cht.nls
+++ b/dlls/kernel32/nls/cht.nls
@@ -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"
diff --git a/dlls/msvcrt/tests/locale.c b/dlls/msvcrt/tests/locale.c
index 2496ebc..911bddd 100644
--- a/dlls/msvcrt/tests/locale.c
+++ b/dlls/msvcrt/tests/locale.c
@@ -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");




More information about the wine-cvs mailing list