Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
cbcdd6c8
Commit
cbcdd6c8
authored
Jan 31, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: UrlCreateFromPath* is not present on Win95B (winetestbot).
parent
10abf0fb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
12 deletions
+24
-12
url.c
dlls/shlwapi/tests/url.c
+24
-12
No files found.
dlls/shlwapi/tests/url.c
View file @
cbcdd6c8
...
...
@@ -31,6 +31,8 @@
/* ################ */
static
HMODULE
hShlwapi
;
static
HRESULT
(
WINAPI
*
pUrlCreateFromPathA
)(
LPCSTR
,
LPSTR
,
LPDWORD
,
DWORD
);
static
HRESULT
(
WINAPI
*
pUrlCreateFromPathW
)(
LPCWSTR
,
LPWSTR
,
LPDWORD
,
DWORD
);
static
HRESULT
(
WINAPI
*
pUrlCombineA
)(
LPCSTR
,
LPCSTR
,
LPSTR
,
LPDWORD
,
DWORD
);
static
HRESULT
(
WINAPI
*
pUrlCombineW
)(
LPCWSTR
,
LPCWSTR
,
LPWSTR
,
LPDWORD
,
DWORD
);
static
HRESULT
(
WINAPI
*
pUrlCanonicalizeA
)(
LPCSTR
,
LPSTR
,
LPDWORD
,
DWORD
);
...
...
@@ -916,24 +918,32 @@ static void test_UrlCreateFromPath(void)
WCHAR
ret_urlW
[
INTERNET_MAX_URL_LENGTH
];
WCHAR
*
pathW
,
*
urlW
;
if
(
!
pUrlCreateFromPathA
)
{
win_skip
(
"UrlCreateFromPathA not found
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
TEST_URLFROMPATH
)
/
sizeof
(
TEST_URLFROMPATH
[
0
]);
i
++
)
{
len
=
INTERNET_MAX_URL_LENGTH
;
ret
=
UrlCreateFromPathA
(
TEST_URLFROMPATH
[
i
].
path
,
ret_url
,
&
len
,
0
);
ret
=
p
UrlCreateFromPathA
(
TEST_URLFROMPATH
[
i
].
path
,
ret_url
,
&
len
,
0
);
ok
(
ret
==
TEST_URLFROMPATH
[
i
].
ret
,
"ret %08x from path %s
\n
"
,
ret
,
TEST_URLFROMPATH
[
i
].
path
);
ok
(
!
lstrcmpi
(
ret_url
,
TEST_URLFROMPATH
[
i
].
url
),
"url %s from path %s
\n
"
,
ret_url
,
TEST_URLFROMPATH
[
i
].
path
);
ok
(
len
==
strlen
(
ret_url
),
"ret len %d from path %s
\n
"
,
len
,
TEST_URLFROMPATH
[
i
].
path
);
len
=
INTERNET_MAX_URL_LENGTH
;
pathW
=
GetWideString
(
TEST_URLFROMPATH
[
i
].
path
);
urlW
=
GetWideString
(
TEST_URLFROMPATH
[
i
].
url
);
ret
=
UrlCreateFromPathW
(
pathW
,
ret_urlW
,
&
len
,
0
);
WideCharToMultiByte
(
CP_ACP
,
0
,
ret_urlW
,
-
1
,
ret_url
,
sizeof
(
ret_url
),
0
,
0
);
ok
(
ret
==
TEST_URLFROMPATH
[
i
].
ret
,
"ret %08x from path L
\"
%s
\"
, expected %08x
\n
"
,
ret
,
TEST_URLFROMPATH
[
i
].
path
,
TEST_URLFROMPATH
[
i
].
ret
);
ok
(
!
lstrcmpiW
(
ret_urlW
,
urlW
),
"got %s expected %s from path L
\"
%s
\"\n
"
,
ret_url
,
TEST_URLFROMPATH
[
i
].
url
,
TEST_URLFROMPATH
[
i
].
path
);
ok
(
len
==
lstrlenW
(
ret_urlW
),
"ret len %d from path L
\"
%s
\"\n
"
,
len
,
TEST_URLFROMPATH
[
i
].
path
);
FreeWideString
(
urlW
);
FreeWideString
(
pathW
);
if
(
pUrlCreateFromPathW
)
{
len
=
INTERNET_MAX_URL_LENGTH
;
pathW
=
GetWideString
(
TEST_URLFROMPATH
[
i
].
path
);
urlW
=
GetWideString
(
TEST_URLFROMPATH
[
i
].
url
);
ret
=
pUrlCreateFromPathW
(
pathW
,
ret_urlW
,
&
len
,
0
);
WideCharToMultiByte
(
CP_ACP
,
0
,
ret_urlW
,
-
1
,
ret_url
,
sizeof
(
ret_url
),
0
,
0
);
ok
(
ret
==
TEST_URLFROMPATH
[
i
].
ret
,
"ret %08x from path L
\"
%s
\"
, expected %08x
\n
"
,
ret
,
TEST_URLFROMPATH
[
i
].
path
,
TEST_URLFROMPATH
[
i
].
ret
);
ok
(
!
lstrcmpiW
(
ret_urlW
,
urlW
),
"got %s expected %s from path L
\"
%s
\"\n
"
,
ret_url
,
TEST_URLFROMPATH
[
i
].
url
,
TEST_URLFROMPATH
[
i
].
path
);
ok
(
len
==
lstrlenW
(
ret_urlW
),
"ret len %d from path L
\"
%s
\"\n
"
,
len
,
TEST_URLFROMPATH
[
i
].
path
);
FreeWideString
(
urlW
);
FreeWideString
(
pathW
);
}
}
}
...
...
@@ -1205,6 +1215,8 @@ START_TEST(url)
{
hShlwapi
=
GetModuleHandleA
(
"shlwapi.dll"
);
pUrlCreateFromPathA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"UrlCreateFromPathA"
);
pUrlCreateFromPathW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"UrlCreateFromPathW"
);
pUrlCombineA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"UrlCombineA"
);
pUrlCombineW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"UrlCombineW"
);
pUrlCanonicalizeA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"UrlCanonicalizeA"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment