Alexandre Julliard : shlwapi: Fixed string tests for non-English locales.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Dec 8 06:07:14 CST 2006


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Dec  8 12:55:43 2006 +0100

shlwapi: Fixed string tests for non-English locales.

---

 dlls/shlwapi/tests/string.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c
index 5bed266..6369a87 100644
--- a/dlls/shlwapi/tests/string.c
+++ b/dlls/shlwapi/tests/string.c
@@ -761,8 +761,8 @@ START_TEST(string)
   TCHAR decimalDelim[8];
   CoInitialize(0);
 
-  GetLocaleInfo(GetUserDefaultLCID(), LOCALE_STHOUSAND, thousandDelim, 8);
-  GetLocaleInfo(GetUserDefaultLCID(), LOCALE_SDECIMAL, decimalDelim, 8);
+  GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, thousandDelim, 8);
+  GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8);
 
   hShlwapi = GetModuleHandleA("shlwapi");
   if (!hShlwapi)
@@ -787,11 +787,13 @@ START_TEST(string)
     test_StrFormatKBSizeA();
     test_StrFormatKBSizeW();
   }
-  if (0)
-  {
-    /* language-dependent test. FIXME: how to detect the language? */
+
+  /* language-dependent test */
+  if (PRIMARYLANGID(GetUserDefaultLangID()) != LANG_ENGLISH)
+    trace("Skipping StrFromTimeInterval test for non English language\n");
+  else
     test_StrFromTimeIntervalA();
-  }
+
   test_StrCmpA();
   test_StrCmpW();
   test_StrRetToBSTR();




More information about the wine-cvs mailing list