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
8310bd53
Commit
8310bd53
authored
Jan 03, 2005
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement and test URLIS_URL flag in UrlIs().
parent
18511a38
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
path.c
dlls/shlwapi/tests/path.c
+16
-1
url.c
dlls/shlwapi/url.c
+8
-0
No files found.
dlls/shlwapi/tests/path.c
View file @
8310bd53
...
...
@@ -235,7 +235,8 @@ struct {
{
"http://foo/bar"
,
TRUE
},
{
"c:
\\
foo
\\
bar"
,
FALSE
},
{
"foo://foo/bar"
,
TRUE
},
{
"foo
\\
bar"
,
FALSE
}
{
"foo
\\
bar"
,
FALSE
},
{
"foo.bar"
,
FALSE
}
};
static
LPWSTR
GetWideString
(
const
char
*
szString
)
...
...
@@ -472,6 +473,19 @@ static void test_UrlCreateFromPath(void)
}
}
static
void
test_UrlIs
(
void
)
{
BOOL
ret
;
INT
i
;
for
(
i
=
0
;
i
<
sizeof
(
TEST_PATH_IS_URL
)
/
sizeof
(
TEST_PATH_IS_URL
[
0
]);
i
++
)
{
ret
=
UrlIsA
(
TEST_PATH_IS_URL
[
i
].
path
,
URLIS_URL
);
ok
(
ret
==
TEST_PATH_IS_URL
[
i
].
expect
,
"returned %d from path %s, expected %d
\n
"
,
ret
,
TEST_PATH_IS_URL
[
i
].
path
,
TEST_PATH_IS_URL
[
i
].
expect
);
}
}
static
void
test_UrlUnescape
(
void
)
{
CHAR
szReturnUrl
[
INTERNET_MAX_URL_LENGTH
];
...
...
@@ -600,6 +614,7 @@ START_TEST(path)
test_UrlEscape
();
test_UrlCombine
();
test_UrlCreateFromPath
();
test_UrlIs
();
test_UrlUnescape
();
test_PathSearchAndQualify
();
...
...
dlls/shlwapi/url.c
View file @
8310bd53
...
...
@@ -1632,6 +1632,8 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
DWORD
res1
;
LPCSTR
last
;
TRACE
(
"(%s %d)
\n
"
,
debugstr_a
(
pszUrl
),
Urlis
);
switch
(
Urlis
)
{
case
URLIS_OPAQUE
:
...
...
@@ -1651,6 +1653,8 @@ BOOL WINAPI UrlIsA(LPCSTR pszUrl, URLIS Urlis)
return
(
last
>=
pszUrl
&&
(
*
last
==
'/'
||
*
last
==
'\\'
));
case
URLIS_URL
:
return
PathIsURLA
(
pszUrl
);
case
URLIS_NOHISTORY
:
case
URLIS_APPLIABLE
:
case
URLIS_HASQUERY
:
...
...
@@ -1672,6 +1676,8 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
DWORD
res1
;
LPCWSTR
last
;
TRACE
(
"(%s %d)
\n
"
,
debugstr_w
(
pszUrl
),
Urlis
);
switch
(
Urlis
)
{
case
URLIS_OPAQUE
:
...
...
@@ -1691,6 +1697,8 @@ BOOL WINAPI UrlIsW(LPCWSTR pszUrl, URLIS Urlis)
return
(
last
>=
pszUrl
&&
(
*
last
==
'/'
||
*
last
==
'\\'
));
case
URLIS_URL
:
return
PathIsURLW
(
pszUrl
);
case
URLIS_NOHISTORY
:
case
URLIS_APPLIABLE
:
case
URLIS_HASQUERY
:
...
...
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