Francois Gouget : msvcrt/tests: Fix the Norwegian locale tests on Windows 10.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Feb 18 10:14:55 CST 2016


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Thu Feb 18 03:15:20 2016 +0100

msvcrt/tests: Fix the Norwegian locale tests on Windows 10.

Also add comments to indicate which Windows version returns what.

Signed-off-by: Francois Gouget <fgouget at free.fr>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/msvcrt/tests/locale.c | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/dlls/msvcrt/tests/locale.c b/dlls/msvcrt/tests/locale.c
index f4d86bc..89761dd 100644
--- a/dlls/msvcrt/tests/locale.c
+++ b/dlls/msvcrt/tests/locale.c
@@ -148,11 +148,11 @@ todo_wine
     ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
     if(ret)
     {
+        trace("Chinese_China.936=%s\n", ret);
 todo_wine
-        ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936")
-        || !strcmp(ret, "Chinese (Simplified)_China.936")
+        ok(!strcmp(ret, "Chinese (Simplified)_People's Republic of China.936") /* Vista - Win7 */
+        || !strcmp(ret, "Chinese (Simplified)_China.936") /* Win8 - Win10 */
         || broken(!strcmp(ret, "Chinese_People's Republic of China.936")), "ret = %s\n", ret);
-        trace("ret is %s\n", ret);
     }
 
     ret = setlocale(LC_ALL, "csy");
@@ -450,33 +450,39 @@ todo_wine
     ret = setlocale(LC_ALL, "non");
     ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
     if(ret)
-        ok(!strcmp( ret, "Norwegian-Nynorsk_Norway.1252")
+        ok(!strcmp( ret, "Norwegian-Nynorsk_Norway.1252") /* XP - Win10 */
         || !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252")
         || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252"))
-        || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
+        || broken(!strcmp(ret, "Norwegian_Norway.1252")), /* WinME */
+           "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\xe5l)_Norway.1252")
+        ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") /* XP - Win8 */
+        || !strcmp(ret, "Norwegian Bokm\xe5l_Norway.1252") /* Win10 */
         || !strcmp(ret, "Norwegian (Bokmal)_Norway.1252")
-        || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
+        || broken(!strcmp(ret, "Norwegian_Norway.1252")), /* WinME */
+           "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\xe5l)_Norway.1252")
+        ok(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252") /* XP - Win8 */
+        || !strcmp(ret, "Norwegian Bokm\xe5l_Norway.1252") /* Win10 */
         || !strcmp(ret, "Norwegian (Bokmal)_Norway.1252")
-        || broken(!strcmp(ret, "Norwegian_Norway.1252")), "ret = %s\n", ret);
+        || broken(!strcmp(ret, "Norwegian_Norway.1252")), /* WinME */
+           "ret = %s\n", ret);
 
     ret = setlocale(LC_ALL, "norwegian-nynorsk");
     ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");
     if(ret)
-        ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252")
+        ok(!strcmp(ret, "Norwegian-Nynorsk_Norway.1252") /* Vista - Win10 */
         || !strcmp(ret, "Norwegian (Nynorsk)_Norway.1252")
-        || broken(!strcmp(ret, "Norwegian_Norway.1252"))
+        || broken(!strcmp(ret, "Norwegian_Norway.1252")) /* WinME */
         || broken(!strcmp(ret, "Norwegian (Bokmal)_Norway.1252"))
-        || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")), "ret = %s\n", ret);
+        || broken(!strcmp(ret, "Norwegian (Bokm\xe5l)_Norway.1252")) /* XP & 2003 */,
+           "ret = %s\n", ret);
 
     ret = setlocale(LC_ALL, "plk");
     ok(ret != NULL || broken (ret == NULL), "ret == NULL\n");




More information about the wine-cvs mailing list