[PATCH] shlwapi/tests: ChrCmpI* not present on Win95B (winetestbot)

Detlef Riekenberg wine.dev at web.de
Sat Jan 30 09:25:05 CST 2010


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

diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c
index eae8905..8915cc1 100644
--- a/dlls/shlwapi/tests/string.c
+++ b/dlls/shlwapi/tests/string.c
@@ -40,6 +40,8 @@
     ok(ret == val1 || ret == val2, "Unexpected value of '" #expr "': " #fmt " instead of " #val1 " or " #val2 "\n", ret); \
 } while (0);
 
+static BOOL    (WINAPI *pChrCmpIA)(CHAR, CHAR);
+static BOOL    (WINAPI *pChrCmpIW)(WCHAR, WCHAR);
 static BOOL    (WINAPI *pIntlStrEqWorkerA)(BOOL,LPCSTR,LPCSTR,int);
 static BOOL    (WINAPI *pIntlStrEqWorkerW)(BOOL,LPCWSTR,LPCWSTR,int);
 static DWORD   (WINAPI *pSHAnsiToAnsi)(LPCSTR,LPSTR,int);
@@ -608,9 +610,13 @@ static void test_StrCmpA(void)
   static const char str2[] = {'a','B','c','d','e','f'};
   ok(0 != StrCmpNA(str1, str2, 6), "StrCmpNA is case-insensitive\n");
   ok(0 == StrCmpNIA(str1, str2, 6), "StrCmpNIA is case-sensitive\n");
-  ok(!ChrCmpIA('a', 'a'), "ChrCmpIA doesn't work at all!\n");
-  ok(!ChrCmpIA('b', 'B'), "ChrCmpIA is not case-insensitive\n");
-  ok(ChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n");
+  if (pChrCmpIA) {
+    ok(!pChrCmpIA('a', 'a'), "ChrCmpIA doesn't work at all!\n");
+    ok(!pChrCmpIA('b', 'B'), "ChrCmpIA is not case-insensitive\n");
+    ok(pChrCmpIA('a', 'z'), "ChrCmpIA believes that a == z!\n");
+  }
+  else
+    win_skip("ChrCmpIW() is not available\n");
 
   if (pStrIsIntlEqualA)
   {
@@ -635,9 +641,13 @@ static void test_StrCmpW(void)
   static const WCHAR str2[] = {'a','B','c','d','e','f'};
   ok(0 != StrCmpNW(str1, str2, 5), "StrCmpNW is case-insensitive\n");
   ok(0 == StrCmpNIW(str1, str2, 5), "StrCmpNIW is case-sensitive\n");
-  ok(!ChrCmpIW('a', 'a'), "ChrCmpIW doesn't work at all!\n");
-  ok(!ChrCmpIW('b', 'B'), "ChrCmpIW is not case-insensitive\n");
-  ok(ChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n");
+  if (pChrCmpIW) {
+    ok(!pChrCmpIW('a', 'a'), "ChrCmpIW doesn't work at all!\n");
+    ok(!pChrCmpIW('b', 'B'), "ChrCmpIW is not case-insensitive\n");
+    ok(pChrCmpIW('a', 'z'), "ChrCmpIW believes that a == z!\n");
+  }
+  else
+    win_skip("ChrCmpIW() is not available\n");
 
   if (pStrIsIntlEqualW)
   {
@@ -925,6 +935,8 @@ START_TEST(string)
   GetLocaleInfo(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimalDelim, 8);
 
   hShlwapi = GetModuleHandleA("shlwapi");
+  pChrCmpIA = (void *)GetProcAddress(hShlwapi, "ChrCmpIA");
+  pChrCmpIW = (void *)GetProcAddress(hShlwapi, "ChrCmpIW");
   pIntlStrEqWorkerA = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerA");
   pIntlStrEqWorkerW = (void *)GetProcAddress(hShlwapi, "IntlStrEqWorkerW");
   pSHAnsiToAnsi = (void *)GetProcAddress(hShlwapi, (LPSTR)345);
-- 
1.6.5




More information about the wine-patches mailing list