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
a1544731
Commit
a1544731
authored
Jul 14, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Jul 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Add more tests for InternetCrackurl.
parent
6de2ca84
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
internet.c
dlls/wininet/internet.c
+7
-0
url.c
dlls/wininet/tests/url.c
+18
-0
No files found.
dlls/wininet/internet.c
View file @
a1544731
...
@@ -1323,6 +1323,13 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
...
@@ -1323,6 +1323,13 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl_orig, DWORD dwUrlLength_orig, DWOR
dwUrlLength
=
strlenW
(
lpszUrl
);
dwUrlLength
=
strlenW
(
lpszUrl
);
TRACE
(
"(%s %lu %lx %p)
\n
"
,
debugstr_w
(
lpszUrl
),
dwUrlLength
,
dwFlags
,
lpUC
);
TRACE
(
"(%s %lu %lx %p)
\n
"
,
debugstr_w
(
lpszUrl
),
dwUrlLength
,
dwFlags
,
lpUC
);
if
(
!
lpszUrl_orig
||
!*
lpszUrl_orig
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
dwFlags
&
ICU_DECODE
)
if
(
dwFlags
&
ICU_DECODE
)
{
{
lpszUrl_decode
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwUrlLength
*
sizeof
(
WCHAR
)
);
lpszUrl_decode
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwUrlLength
*
sizeof
(
WCHAR
)
);
...
...
dlls/wininet/tests/url.c
View file @
a1544731
...
@@ -208,6 +208,24 @@ static void InternetCrackUrl_test(void)
...
@@ -208,6 +208,24 @@ static void InternetCrackUrl_test(void)
ok
(
!
strcmp
(
urlComponents
.
lpszScheme
,
"about"
),
"lpszScheme was
\"
%s
\"
instead of
\"
about
\"\n
"
,
urlComponents
.
lpszScheme
);
ok
(
!
strcmp
(
urlComponents
.
lpszScheme
,
"about"
),
"lpszScheme was
\"
%s
\"
instead of
\"
about
\"\n
"
,
urlComponents
.
lpszScheme
);
ok
(
!
strcmp
(
urlComponents
.
lpszHostName
,
"host"
),
"lpszHostName was
\"
%s
\"
instead of
\"
host
\"\n
"
,
urlComponents
.
lpszHostName
);
ok
(
!
strcmp
(
urlComponents
.
lpszHostName
,
"host"
),
"lpszHostName was
\"
%s
\"
instead of
\"
host
\"\n
"
,
urlComponents
.
lpszHostName
);
ok
(
!
strcmp
(
urlComponents
.
lpszUrlPath
,
"/blank"
),
"lpszUrlPath was
\"
%s
\"
instead of
\"
/blank
\"\n
"
,
urlComponents
.
lpszUrlPath
);
ok
(
!
strcmp
(
urlComponents
.
lpszUrlPath
,
"/blank"
),
"lpszUrlPath was
\"
%s
\"
instead of
\"
/blank
\"\n
"
,
urlComponents
.
lpszUrlPath
);
/* try a NULL lpszUrl */
SetLastError
(
0xdeadbeef
);
copy_compsA
(
&
urlSrc
,
&
urlComponents
,
32
,
1024
,
1024
,
1024
,
2048
,
1024
);
ret
=
InternetCrackUrl
(
NULL
,
0
,
0
,
&
urlComponents
);
GLE
=
GetLastError
();
ok
(
ret
==
FALSE
,
"Expected InternetCrackUrl to fail
\n
"
);
ok
(
GLE
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %ld
\n
"
,
GLE
);
/* try an empty lpszUrl, GetLastError returns 12006, whatever that means
* we just need to fail and not return success
*/
SetLastError
(
0xdeadbeef
);
copy_compsA
(
&
urlSrc
,
&
urlComponents
,
32
,
1024
,
1024
,
1024
,
2048
,
1024
);
ret
=
InternetCrackUrl
(
""
,
0
,
0
,
&
urlComponents
);
GLE
=
GetLastError
();
ok
(
ret
==
FALSE
,
"Expected InternetCrackUrl to fail
\n
"
);
ok
(
GLE
!=
0xdeadbeef
&&
GLE
!=
ERROR_SUCCESS
,
"Expected GLE to represent a failure
\n
"
);
}
}
static
void
InternetCrackUrlW_test
(
void
)
static
void
InternetCrackUrlW_test
(
void
)
...
...
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