Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e3b3b1e2
Commit
e3b3b1e2
authored
Jan 30, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Feb 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: PathCreateFromUrl* is not present on Win95B (winetestbot).
parent
cb3e537b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
13 deletions
+25
-13
path.c
dlls/shlwapi/tests/path.c
+25
-13
No files found.
dlls/shlwapi/tests/path.c
View file @
e3b3b1e2
...
...
@@ -32,6 +32,8 @@ static HMODULE hShlwapi;
static
HRESULT
(
WINAPI
*
pPathIsValidCharA
)(
char
,
DWORD
);
static
HRESULT
(
WINAPI
*
pPathIsValidCharW
)(
WCHAR
,
DWORD
);
static
LPWSTR
(
WINAPI
*
pPathCombineW
)(
LPWSTR
,
LPCWSTR
,
LPCWSTR
);
static
HRESULT
(
WINAPI
*
pPathCreateFromUrlA
)(
LPCSTR
,
LPSTR
,
LPDWORD
,
DWORD
);
static
HRESULT
(
WINAPI
*
pPathCreateFromUrlW
)(
LPCWSTR
,
LPWSTR
,
LPDWORD
,
DWORD
);
/* ################ */
...
...
@@ -207,31 +209,39 @@ static void test_PathCreateFromUrl(void)
WCHAR
*
pathW
,
*
urlW
;
static
const
char
url
[]
=
"http://www.winehq.org"
;
if
(
!
pPathCreateFromUrlA
)
{
win_skip
(
"PathCreateFromUrlA not found
\n
"
);
return
;
}
/* Check ret_path = NULL */
len
=
sizeof
(
url
);
ret
=
PathCreateFromUrlA
(
url
,
NULL
,
&
len
,
0
);
ret
=
pPathCreateFromUrlA
(
url
,
NULL
,
&
len
,
0
);
ok
(
ret
==
E_INVALIDARG
,
"got 0x%08x expected E_INVALIDARG
\n
"
,
ret
);
for
(
i
=
0
;
i
<
sizeof
(
TEST_PATHFROMURL
)
/
sizeof
(
TEST_PATHFROMURL
[
0
]);
i
++
)
{
len
=
INTERNET_MAX_URL_LENGTH
;
ret
=
PathCreateFromUrlA
(
TEST_PATHFROMURL
[
i
].
url
,
ret_path
,
&
len
,
0
);
ret
=
p
PathCreateFromUrlA
(
TEST_PATHFROMURL
[
i
].
url
,
ret_path
,
&
len
,
0
);
ok
(
ret
==
TEST_PATHFROMURL
[
i
].
ret
,
"ret %08x from url %s
\n
"
,
ret
,
TEST_PATHFROMURL
[
i
].
url
);
if
(
TEST_PATHFROMURL
[
i
].
path
)
{
ok
(
!
lstrcmpi
(
ret_path
,
TEST_PATHFROMURL
[
i
].
path
),
"got %s expected %s from url %s
\n
"
,
ret_path
,
TEST_PATHFROMURL
[
i
].
path
,
TEST_PATHFROMURL
[
i
].
url
);
ok
(
len
==
strlen
(
ret_path
),
"ret len %d from url %s
\n
"
,
len
,
TEST_PATHFROMURL
[
i
].
url
);
}
len
=
INTERNET_MAX_URL_LENGTH
;
pathW
=
GetWideString
(
TEST_PATHFROMURL
[
i
].
path
);
urlW
=
GetWideString
(
TEST_PATHFROMURL
[
i
].
url
);
ret
=
PathCreateFromUrlW
(
urlW
,
ret_pathW
,
&
len
,
0
);
WideCharToMultiByte
(
CP_ACP
,
0
,
ret_pathW
,
-
1
,
ret_path
,
sizeof
(
ret_path
),
0
,
0
);
ok
(
ret
==
TEST_PATHFROMURL
[
i
].
ret
,
"ret %08x from url L
\"
%s
\"\n
"
,
ret
,
TEST_PATHFROMURL
[
i
].
url
);
if
(
TEST_PATHFROMURL
[
i
].
path
)
{
ok
(
!
lstrcmpiW
(
ret_pathW
,
pathW
),
"got %s expected %s from url L
\"
%s
\"\n
"
,
ret_path
,
TEST_PATHFROMURL
[
i
].
path
,
TEST_PATHFROMURL
[
i
].
url
);
ok
(
len
==
lstrlenW
(
ret_pathW
),
"ret len %d from url L
\"
%s
\"\n
"
,
len
,
TEST_PATHFROMURL
[
i
].
url
);
if
(
pPathCreateFromUrlW
)
{
len
=
INTERNET_MAX_URL_LENGTH
;
pathW
=
GetWideString
(
TEST_PATHFROMURL
[
i
].
path
);
urlW
=
GetWideString
(
TEST_PATHFROMURL
[
i
].
url
);
ret
=
pPathCreateFromUrlW
(
urlW
,
ret_pathW
,
&
len
,
0
);
WideCharToMultiByte
(
CP_ACP
,
0
,
ret_pathW
,
-
1
,
ret_path
,
sizeof
(
ret_path
),
0
,
0
);
ok
(
ret
==
TEST_PATHFROMURL
[
i
].
ret
,
"ret %08x from url L
\"
%s
\"\n
"
,
ret
,
TEST_PATHFROMURL
[
i
].
url
);
if
(
TEST_PATHFROMURL
[
i
].
path
)
{
ok
(
!
lstrcmpiW
(
ret_pathW
,
pathW
),
"got %s expected %s from url L
\"
%s
\"\n
"
,
ret_path
,
TEST_PATHFROMURL
[
i
].
path
,
TEST_PATHFROMURL
[
i
].
url
);
ok
(
len
==
lstrlenW
(
ret_pathW
),
"ret len %d from url L
\"
%s
\"\n
"
,
len
,
TEST_PATHFROMURL
[
i
].
url
);
}
FreeWideString
(
urlW
);
FreeWideString
(
pathW
);
}
FreeWideString
(
urlW
);
FreeWideString
(
pathW
);
}
}
...
...
@@ -1307,6 +1317,8 @@ static void test_PathUnquoteSpaces(void)
START_TEST
(
path
)
{
hShlwapi
=
GetModuleHandleA
(
"shlwapi.dll"
);
pPathCreateFromUrlA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"PathCreateFromUrlA"
);
pPathCreateFromUrlW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
"PathCreateFromUrlW"
);
test_PathSearchAndQualify
();
test_PathCreateFromUrl
();
...
...
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