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
c169263b
Commit
c169263b
authored
May 18, 2020
by
Zhiyi Zhang
Committed by
Alexandre Julliard
May 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi/tests: Test NULL UrlCanonicalizeA/W() parameters.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3cbd9cda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
url.c
dlls/shlwapi/tests/url.c
+32
-0
No files found.
dlls/shlwapi/tests/url.c
View file @
c169263b
...
...
@@ -1052,6 +1052,22 @@ static void test_UrlCanonicalizeA(void)
urllen
=
lstrlenA
(
winehqA
);
/* Parameter checks */
dwSize
=
ARRAY_SIZE
(
szReturnUrl
);
hr
=
pUrlCanonicalizeA
(
NULL
,
szReturnUrl
,
&
dwSize
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
dwSize
=
ARRAY_SIZE
(
szReturnUrl
);
hr
=
pUrlCanonicalizeA
(
winehqA
,
NULL
,
&
dwSize
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
pUrlCanonicalizeA
(
winehqA
,
szReturnUrl
,
NULL
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
dwSize
=
0
;
hr
=
pUrlCanonicalizeA
(
winehqA
,
szReturnUrl
,
&
dwSize
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
/* buffer has no space for the result */
dwSize
=
urllen
-
1
;
memset
(
szReturnUrl
,
'#'
,
urllen
+
4
);
...
...
@@ -1137,6 +1153,22 @@ static void test_UrlCanonicalizeW(void)
}
urllen
=
lstrlenW
(
winehqW
);
/* Parameter checks */
dwSize
=
ARRAY_SIZE
(
szReturnUrl
);
hr
=
pUrlCanonicalizeW
(
NULL
,
szReturnUrl
,
&
dwSize
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
dwSize
=
ARRAY_SIZE
(
szReturnUrl
);
hr
=
pUrlCanonicalizeW
(
winehqW
,
NULL
,
&
dwSize
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
pUrlCanonicalizeW
(
winehqW
,
szReturnUrl
,
NULL
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
dwSize
=
0
;
hr
=
pUrlCanonicalizeW
(
winehqW
,
szReturnUrl
,
&
dwSize
,
URL_UNESCAPE
);
ok
(
hr
==
E_INVALIDARG
,
"Got unexpected hr %#x.
\n
"
,
hr
);
/* buffer has no space for the result */
dwSize
=
(
urllen
-
1
);
memset
(
szReturnUrl
,
'#'
,
(
urllen
+
4
)
*
sizeof
(
WCHAR
));
...
...
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