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
05437748
Commit
05437748
authored
Feb 10, 2005
by
Paul Vriens
Committed by
Alexandre Julliard
Feb 10, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use aliases for calls to ordinals.
parent
fccb667f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
13 deletions
+21
-13
path.c
dlls/shlwapi/tests/path.c
+21
-13
No files found.
dlls/shlwapi/tests/path.c
View file @
05437748
...
...
@@ -30,6 +30,10 @@
#include "shlwapi.h"
#include "wininet.h"
static
HMODULE
hShlwapi
;
static
HRESULT
(
WINAPI
*
pPathIsValidCharA
)(
char
,
DWORD
);
static
HRESULT
(
WINAPI
*
pPathIsValidCharW
)(
WCHAR
,
DWORD
);
const
char
*
TEST_URL_1
=
"http://www.winehq.org/tests?date=10/10/1923"
;
const
char
*
TEST_URL_2
=
"http://localhost:8080/tests%2e.html?date=Mon%2010/10/1923"
;
const
char
*
TEST_URL_3
=
"http://foo:bar@localhost:21/internal.php?query=x&return=y"
;
...
...
@@ -642,23 +646,20 @@ static const DWORD SHELL_charclass[] =
0x00000000
,
0x00000100
,
0x00000100
};
BOOL
WINAPI
PathIsValidCharA
(
char
c
,
DWORD
class
);
BOOL
WINAPI
PathIsValidCharW
(
WCHAR
c
,
DWORD
class
);
static
void
test_PathIsValidCharA
(
void
)
{
BOOL
ret
;
unsigned
int
c
;
ret
=
PathIsValidCharA
(
0x7f
,
0
);
ret
=
p
PathIsValidCharA
(
0x7f
,
0
);
ok
(
!
ret
,
"PathIsValidCharA succeeded: 0x%08lx
\n
"
,
(
DWORD
)
ret
);
ret
=
PathIsValidCharA
(
0x7f
,
1
);
ret
=
p
PathIsValidCharA
(
0x7f
,
1
);
ok
(
!
ret
,
"PathIsValidCharA succeeded: 0x%08lx
\n
"
,
(
DWORD
)
ret
);
for
(
c
=
0
;
c
<
0x7f
;
c
++
)
{
ret
=
PathIsValidCharA
(
c
,
~
0U
);
ret
=
p
PathIsValidCharA
(
c
,
~
0U
);
ok
(
ret
==
SHELL_charclass
[
c
]
||
(
ret
==
1
&&
SHELL_charclass
[
c
]
==
0xffffffff
),
"PathIsValidCharA failed: 0x%02x got 0x%08lx expected 0x%08lx
\n
"
,
c
,
(
DWORD
)
ret
,
SHELL_charclass
[
c
]
);
...
...
@@ -666,7 +667,7 @@ static void test_PathIsValidCharA(void)
for
(
c
=
0x7f
;
c
<=
0xff
;
c
++
)
{
ret
=
PathIsValidCharA
(
c
,
~
0U
);
ret
=
p
PathIsValidCharA
(
c
,
~
0U
);
ok
(
ret
==
0x00000100
,
"PathIsValidCharA failed: 0x%02x got 0x%08lx expected 0x00000100
\n
"
,
c
,
(
DWORD
)
ret
);
...
...
@@ -678,15 +679,15 @@ static void test_PathIsValidCharW(void)
BOOL
ret
;
unsigned
int
c
;
ret
=
PathIsValidCharW
(
0x7f
,
0
);
ret
=
p
PathIsValidCharW
(
0x7f
,
0
);
ok
(
!
ret
,
"PathIsValidCharW succeeded: 0x%08lx
\n
"
,
(
DWORD
)
ret
);
ret
=
PathIsValidCharW
(
0x7f
,
1
);
ret
=
p
PathIsValidCharW
(
0x7f
,
1
);
ok
(
!
ret
,
"PathIsValidCharW succeeded: 0x%08lx
\n
"
,
(
DWORD
)
ret
);
for
(
c
=
0
;
c
<
0x7f
;
c
++
)
{
ret
=
PathIsValidCharW
(
c
,
~
0U
);
ret
=
p
PathIsValidCharW
(
c
,
~
0U
);
ok
(
ret
==
SHELL_charclass
[
c
]
||
(
ret
==
1
&&
SHELL_charclass
[
c
]
==
0xffffffff
),
"PathIsValidCharW failed: 0x%02x got 0x%08lx expected 0x%08lx
\n
"
,
c
,
(
DWORD
)
ret
,
SHELL_charclass
[
c
]
);
...
...
@@ -694,7 +695,7 @@ static void test_PathIsValidCharW(void)
for
(
c
=
0x007f
;
c
<=
0xffff
;
c
++
)
{
ret
=
PathIsValidCharW
(
c
,
~
0U
);
ret
=
p
PathIsValidCharW
(
c
,
~
0U
);
ok
(
ret
==
0x00000100
,
"PathIsValidCharW failed: 0x%02x got 0x%08lx expected 0x00000100
\n
"
,
c
,
(
DWORD
)
ret
);
...
...
@@ -703,6 +704,9 @@ static void test_PathIsValidCharW(void)
START_TEST
(
path
)
{
hShlwapi
=
LoadLibraryA
(
"shlwapi.dll"
);
if
(
!
hShlwapi
)
return
;
test_UrlHash
();
test_UrlGetPart
();
test_UrlCanonicalize
();
...
...
@@ -715,6 +719,10 @@ START_TEST(path)
test_PathSearchAndQualify
();
test_PathCreateFromUrl
();
test_PathIsUrl
();
test_PathIsValidCharA
();
test_PathIsValidCharW
();
pPathIsValidCharA
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
(
LPSTR
)
455
);
if
(
pPathIsValidCharA
)
test_PathIsValidCharA
();
pPathIsValidCharW
=
(
void
*
)
GetProcAddress
(
hShlwapi
,
(
LPSTR
)
456
);
if
(
pPathIsValidCharW
)
test_PathIsValidCharW
();
}
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