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
ac7f6fda
Commit
ac7f6fda
authored
Aug 23, 2021
by
Daniel Lehman
Committed by
Alexandre Julliard
Aug 23, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase/tests: Add more tests for combining the second path.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9323d33f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
path.c
dlls/kernelbase/tests/path.c
+13
-0
No files found.
dlls/kernelbase/tests/path.c
View file @
ac7f6fda
...
...
@@ -426,6 +426,7 @@ struct combine_test
const
CHAR
*
path1
;
const
CHAR
*
path2
;
const
CHAR
*
result
;
BOOL
todo
;
};
static
const
struct
combine_test
combine_tests
[]
=
...
...
@@ -473,12 +474,21 @@ static const struct combine_test combine_tests[] =
/* Second path is fully qualified */
{
"X:
\\
"
,
"C:"
,
"C:
\\
"
},
{
"X:
\\
"
,
"C:
\\
"
,
"C:
\\
"
},
{
"X:
\\
"
,
"C:
\\
a"
,
"C:
\\
a"
,
TRUE
},
{
"X:
\\
"
,
"
\\\\
"
,
"
\\\\
"
},
{
"X:
\\
"
,
"
\\\\
a"
,
"
\\\\
a"
,
TRUE
},
{
"X:
\\
"
,
"
\\\\
?
\\
C:"
,
"C:
\\
"
},
{
"X:
\\
"
,
"
\\\\
?
\\
C:
\\
"
,
"C:
\\
"
},
{
"X:
\\
"
,
"
\\\\
?
\\
C:
\\
a"
,
"C:
\\
a"
,
TRUE
},
{
"X:
\\
"
,
"
\\\\
?
\\
UNC"
,
"
\\\\
?
\\
UNC"
,
TRUE
},
{
"X:
\\
"
,
"
\\\\
?
\\
UNC
\\
"
,
"
\\\\
"
},
{
"X:
\\
"
,
"
\\\\
?
\\
UNC
\\
a"
,
"
\\\\
a"
,
TRUE
},
{
"X:
\\
"
,
"
\\\\
?
\\
Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}"
,
"
\\\\
?
\\
Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}"
,
TRUE
},
{
"X:
\\
"
,
"
\\\\
?
\\
Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}
\\
"
,
"
\\\\
?
\\
Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}
\\
"
},
{
"X:
\\
"
,
"
\\\\
?
\\
Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}
\\
a"
,
"
\\\\
?
\\
Volume{e51a1864-6f2d-4019-b73d-f4e60e600c26}
\\
a"
,
TRUE
},
/* Canonicalization */
{
"C:
\\
a"
,
".
\\
b"
,
"C:
\\
a
\\
b"
},
...
...
@@ -537,6 +547,7 @@ static void test_PathAllocCombine(void)
if
(
SUCCEEDED
(
hr
))
{
WideCharToMultiByte
(
CP_ACP
,
0
,
resultW
,
-
1
,
resultA
,
ARRAY_SIZE
(
resultA
),
NULL
,
NULL
);
todo_wine_if
(
t
->
todo
)
ok
(
!
lstrcmpA
(
resultA
,
t
->
result
),
"combine %s %s expect result %s, got %s
\n
"
,
t
->
path1
,
t
->
path2
,
t
->
result
,
resultA
);
LocalFree
(
resultW
);
...
...
@@ -600,6 +611,7 @@ static void test_PathCchCombine(void)
hr
=
pPathCchCombine
(
output
,
ARRAY_SIZE
(
output
),
p1
,
p2
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
todo_wine_if
(
combine_tests
[
i
].
todo
)
ok
(
!
lstrcmpW
(
output
,
expected
),
"Combining %s with %s returned %s, expected %s
\n
"
,
wine_dbgstr_w
(
p1
),
wine_dbgstr_w
(
p2
),
wine_dbgstr_w
(
output
),
wine_dbgstr_w
(
expected
));
}
...
...
@@ -668,6 +680,7 @@ static void test_PathCchCombineEx(void)
hr
=
pPathCchCombineEx
(
output
,
MAX_PATH
,
p1
,
p2
,
0
);
ok
(
hr
==
S_OK
,
"Expected S_OK, got %08x
\n
"
,
hr
);
todo_wine_if
(
combine_tests
[
i
].
todo
)
ok
(
!
lstrcmpW
(
output
,
expected
),
"Combining %s with %s returned %s, expected %s
\n
"
,
wine_dbgstr_w
(
p1
),
wine_dbgstr_w
(
p2
),
wine_dbgstr_w
(
output
),
wine_dbgstr_w
(
expected
));
}
...
...
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