Commit ce7eb256 authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

shlwapi/tests: UrlIs* is not present on Win95B (winetestbot).

parent 4f4a47a1
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
/* ################ */ /* ################ */
static HMODULE hShlwapi; static HMODULE hShlwapi;
static BOOL (WINAPI *pUrlIsA)(LPCSTR,URLIS);
static BOOL (WINAPI *pUrlIsW)(LPCWSTR,URLIS);
static HRESULT (WINAPI *pUrlHashA)(LPCSTR,LPBYTE,DWORD); static HRESULT (WINAPI *pUrlHashA)(LPCSTR,LPBYTE,DWORD);
static HRESULT (WINAPI *pUrlHashW)(LPCWSTR,LPBYTE,DWORD); static HRESULT (WINAPI *pUrlHashW)(LPCWSTR,LPBYTE,DWORD);
static HRESULT (WINAPI *pUrlGetPartA)(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD); static HRESULT (WINAPI *pUrlGetPartA)(LPCSTR,LPSTR,LPDWORD,DWORD,DWORD);
...@@ -995,39 +997,48 @@ static void test_UrlIs(void) ...@@ -995,39 +997,48 @@ static void test_UrlIs(void)
size_t i; size_t i;
WCHAR wurl[80]; WCHAR wurl[80];
if (!pUrlIsA) {
win_skip("UrlIsA not found\n");
return;
}
for(i = 0; i < sizeof(TEST_PATH_IS_URL) / sizeof(TEST_PATH_IS_URL[0]); i++) { for(i = 0; i < sizeof(TEST_PATH_IS_URL) / sizeof(TEST_PATH_IS_URL[0]); i++) {
MultiByteToWideChar(CP_ACP, 0, TEST_PATH_IS_URL[i].path, -1, wurl, 80); MultiByteToWideChar(CP_ACP, 0, TEST_PATH_IS_URL[i].path, -1, wurl, 80);
ret = UrlIsA( TEST_PATH_IS_URL[i].path, URLIS_URL ); ret = pUrlIsA( TEST_PATH_IS_URL[i].path, URLIS_URL );
ok( ret == TEST_PATH_IS_URL[i].expect, ok( ret == TEST_PATH_IS_URL[i].expect,
"returned %d from path %s, expected %d\n", ret, TEST_PATH_IS_URL[i].path, "returned %d from path %s, expected %d\n", ret, TEST_PATH_IS_URL[i].path,
TEST_PATH_IS_URL[i].expect ); TEST_PATH_IS_URL[i].expect );
ret = UrlIsW( wurl, URLIS_URL ); if (pUrlIsW) {
ok( ret == TEST_PATH_IS_URL[i].expect, ret = pUrlIsW( wurl, URLIS_URL );
"returned %d from path (UrlIsW) %s, expected %d\n", ret, TEST_PATH_IS_URL[i].path, ok( ret == TEST_PATH_IS_URL[i].expect,
TEST_PATH_IS_URL[i].expect ); "returned %d from path (UrlIsW) %s, expected %d\n", ret,
TEST_PATH_IS_URL[i].path, TEST_PATH_IS_URL[i].expect );
}
} }
for(i = 0; i < sizeof(TEST_URLIS_ATTRIBS) / sizeof(TEST_URLIS_ATTRIBS[0]); i++) { for(i = 0; i < sizeof(TEST_URLIS_ATTRIBS) / sizeof(TEST_URLIS_ATTRIBS[0]); i++) {
MultiByteToWideChar(CP_ACP, 0, TEST_URLIS_ATTRIBS[i].url, -1, wurl, 80); MultiByteToWideChar(CP_ACP, 0, TEST_URLIS_ATTRIBS[i].url, -1, wurl, 80);
ret = UrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_OPAQUE); ret = pUrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_OPAQUE);
ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque, ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque,
"returned %d for URLIS_OPAQUE, url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url, "returned %d for URLIS_OPAQUE, url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url,
TEST_URLIS_ATTRIBS[i].expectOpaque ); TEST_URLIS_ATTRIBS[i].expectOpaque );
ret = UrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_FILEURL); ret = pUrlIsA( TEST_URLIS_ATTRIBS[i].url, URLIS_FILEURL);
ok( ret == TEST_URLIS_ATTRIBS[i].expectFile, ok( ret == TEST_URLIS_ATTRIBS[i].expectFile,
"returned %d for URLIS_FILEURL, url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url, "returned %d for URLIS_FILEURL, url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url,
TEST_URLIS_ATTRIBS[i].expectFile ); TEST_URLIS_ATTRIBS[i].expectFile );
ret = UrlIsW( wurl, URLIS_OPAQUE); if (pUrlIsW) {
ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque, ret = pUrlIsW( wurl, URLIS_OPAQUE);
"returned %d for URLIS_OPAQUE (UrlIsW), url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url, ok( ret == TEST_URLIS_ATTRIBS[i].expectOpaque,
TEST_URLIS_ATTRIBS[i].expectOpaque ); "returned %d for URLIS_OPAQUE (UrlIsW), url \"%s\", expected %d\n",
ret = UrlIsW( wurl, URLIS_FILEURL); ret, TEST_URLIS_ATTRIBS[i].url, TEST_URLIS_ATTRIBS[i].expectOpaque );
ok( ret == TEST_URLIS_ATTRIBS[i].expectFile, ret = pUrlIsW( wurl, URLIS_FILEURL);
"returned %d for URLIS_FILEURL (UrlIsW), url \"%s\", expected %d\n", ret, TEST_URLIS_ATTRIBS[i].url, ok( ret == TEST_URLIS_ATTRIBS[i].expectFile,
TEST_URLIS_ATTRIBS[i].expectFile ); "returned %d for URLIS_FILEURL (UrlIsW), url \"%s\", expected %d\n",
ret, TEST_URLIS_ATTRIBS[i].url, TEST_URLIS_ATTRIBS[i].expectFile );
}
} }
} }
...@@ -1255,6 +1266,8 @@ START_TEST(url) ...@@ -1255,6 +1266,8 @@ START_TEST(url)
{ {
hShlwapi = GetModuleHandleA("shlwapi.dll"); hShlwapi = GetModuleHandleA("shlwapi.dll");
pUrlIsA = (void *) GetProcAddress(hShlwapi, "UrlIsA");
pUrlIsW = (void *) GetProcAddress(hShlwapi, "UrlIsW");
pUrlHashA = (void *) GetProcAddress(hShlwapi, "UrlHashA"); pUrlHashA = (void *) GetProcAddress(hShlwapi, "UrlHashA");
pUrlHashW = (void *) GetProcAddress(hShlwapi, "UrlHashW"); pUrlHashW = (void *) GetProcAddress(hShlwapi, "UrlHashW");
pUrlGetPartA = (void *) GetProcAddress(hShlwapi, "UrlGetPartA"); pUrlGetPartA = (void *) GetProcAddress(hShlwapi, "UrlGetPartA");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment