From 29edebe0cccfc1757f96aba1576bafc618f6044f Mon Sep 17 00:00:00 2001 From: Detlef Riekenberg Date: Sat, 30 Jan 2010 16:25:05 +0100 Subject: [PATCH] shlwapi/tests: ChrCmpI* is not present on Win95B (winetestbot). --- dlls/shlwapi/tests/string.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/dlls/shlwapi/tests/string.c b/dlls/shlwapi/tests/string.c index eae890556ee..00f0b023046 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("ChrCmpIA() 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); -- 2.11.4.GIT