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
ee2abe7f
Commit
ee2abe7f
authored
May 08, 2010
by
Piotr Caban
Committed by
Alexandre Julliard
May 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Added more UrlCanonicalizeA tests.
parent
40119690
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletion
+20
-1
url.c
dlls/shlwapi/tests/url.c
+20
-1
No files found.
dlls/shlwapi/tests/url.c
View file @
ee2abe7f
...
@@ -793,7 +793,8 @@ static void test_UrlEscape(void)
...
@@ -793,7 +793,8 @@ static void test_UrlEscape(void)
static
void
test_UrlCanonicalizeA
(
void
)
static
void
test_UrlCanonicalizeA
(
void
)
{
{
unsigned
int
i
;
unsigned
int
i
;
CHAR
szReturnUrl
[
INTERNET_MAX_URL_LENGTH
];
CHAR
szReturnUrl
[
4
*
INTERNET_MAX_URL_LENGTH
];
CHAR
longurl
[
4
*
INTERNET_MAX_URL_LENGTH
];
DWORD
dwSize
;
DWORD
dwSize
;
DWORD
urllen
;
DWORD
urllen
;
HRESULT
hr
;
HRESULT
hr
;
...
@@ -845,6 +846,24 @@ static void test_UrlCanonicalizeA(void)
...
@@ -845,6 +846,24 @@ static void test_UrlCanonicalizeA(void)
"got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)
\n
"
,
"got 0x%x with %u and size %u for '%s' and %u (expected 'S_OK' and size %u)
\n
"
,
hr
,
GetLastError
(),
dwSize
,
szReturnUrl
,
lstrlenA
(
szReturnUrl
),
urllen
);
hr
,
GetLastError
(),
dwSize
,
szReturnUrl
,
lstrlenA
(
szReturnUrl
),
urllen
);
/* length is set to 0 */
dwSize
=
0
;
memset
(
szReturnUrl
,
'#'
,
urllen
+
4
);
szReturnUrl
[
urllen
+
4
]
=
'\0'
;
SetLastError
(
0xdeadbeef
);
hr
=
pUrlCanonicalizeA
(
winehqA
,
szReturnUrl
,
&
dwSize
,
URL_WININET_COMPATIBILITY
|
URL_ESCAPE_UNSAFE
);
ok
(
(
hr
==
E_INVALIDARG
)
&&
(
dwSize
==
0
),
"got 0x%x with %u and size %u for '%s' and %u (expected 'E_INVALIDARG' and size %u)
\n
"
,
hr
,
GetLastError
(),
dwSize
,
szReturnUrl
,
lstrlenA
(
szReturnUrl
),
0
);
/* url length > INTERNET_MAX_URL_SIZE */
dwSize
=
sizeof
(
szReturnUrl
);
memset
(
longurl
,
'a'
,
sizeof
(
longurl
));
memcpy
(
longurl
,
winehqA
,
sizeof
(
winehqA
)
-
1
);
longurl
[
sizeof
(
longurl
)
-
1
]
=
'\0'
;
hr
=
pUrlCanonicalizeA
(
longurl
,
szReturnUrl
,
&
dwSize
,
URL_WININET_COMPATIBILITY
|
URL_ESCAPE_UNSAFE
);
ok
(
hr
==
S_OK
,
"hr = %x
\n
"
,
hr
);
test_url_canonicalize
(
-
1
,
""
,
0
,
S_OK
,
S_FALSE
/* Vista/win2k8 */
,
""
,
FALSE
);
test_url_canonicalize
(
-
1
,
""
,
0
,
S_OK
,
S_FALSE
/* Vista/win2k8 */
,
""
,
FALSE
);
/* test url-modification */
/* test url-modification */
...
...
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