Francois Gouget : oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests.

Alexandre Julliard julliard at winehq.org
Wed Jul 21 16:04:31 CDT 2021


Module: wine
Branch: master
Commit: 5c86b4d201e46a799cef7eef9922df3610b1568a
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5c86b4d201e46a799cef7eef9922df3610b1568a

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Jul 21 15:10:59 2021 +0200

oleaut32/tests: Fix the Swiss franc and Moroccan dirham tests.

Windows <= 8.1 uses an obsolete currency symbol for the Swiss Franc and
Windows 8.1 incorrectly doubled the right-to-left mark in the Moroccan
dirham.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/tests/vartest.c | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 0ce165b44fa..d3a1a2e3a31 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -2164,14 +2164,26 @@ static void test_VarParseNumFromStrMisc(void)
 
   lcid = MAKELCID(MAKELANGID(LANG_FRENCH,SUBLANG_FRENCH_SWISS),SORT_DEFAULT);
   WCONVERT(L"3CHF", NUMPRS_CURRENCY|NUMPRS_USE_ALL);
-  todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0);
-  EXPECT2(3,FAILDIG);
+  /* Windows <= 8.1 uses an old currency symbol: "fr. 5" */
+  todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres);
+  if (hres == S_OK)
+  {
+    todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,4,0,0);
+    EXPECT2(3,FAILDIG);
+  }
 
   /* 5 Moroccan dirham */
   lcid = MAKELCID(MAKELANGID(LANG_ARABIC,SUBLANG_ARABIC_MOROCCO),SORT_DEFAULT);
   WCONVERT(L"5\x62f.\x645.\x200f", NUMPRS_CURRENCY|NUMPRS_USE_ALL);
-  todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0);
-  EXPECT2(5,FAILDIG);
+  /* Windows 8.1 incorrectly doubles the right-to-left mark:
+   * "\x62f.\x645.\x200f\x200f 5"
+   */
+  todo_wine ok(hres == S_OK || broken(hres == DISP_E_TYPEMISMATCH), "returned %08x\n", hres);
+  if (hres == S_OK)
+  {
+    todo_wine EXPECT(1,NUMPRS_CURRENCY|NUMPRS_USE_ALL,NUMPRS_CURRENCY,6,0,0);
+    EXPECT2(5,FAILDIG);
+  }
 
 
   /* Test Arabic numerals in an Arabic locale */




More information about the wine-cvs mailing list