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
64c4582a
Commit
64c4582a
authored
Jun 19, 2021
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jun 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Expand path name tests with path + device name.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3f292a0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
19 deletions
+25
-19
path.c
dlls/ntdll/tests/path.c
+25
-19
No files found.
dlls/ntdll/tests/path.c
View file @
64c4582a
...
...
@@ -317,6 +317,11 @@ static void test_RtlGetFullPathName_U(void)
{
"..."
,
"C:
\\
windows
\\
"
,
NULL
},
{
"./foo"
,
"C:
\\
windows
\\
foo"
,
"foo"
},
{
"foo/.."
,
"C:
\\
windows"
,
"windows"
},
{
"
\\
windows
\\
nul"
,
"
\\\\
.
\\
nul"
,
NULL
},
{
"C:
\\
nonexistent
\\
nul"
,
"
\\\\
.
\\
nul"
,
NULL
},
{
"C:
\\
con
\\
con"
,
"
\\\\
.
\\
con"
,
NULL
},
{
"C:NUL."
,
"
\\\\
.
\\
NUL"
,
NULL
},
{
"C:NUL"
,
"
\\\\
.
\\
NUL"
,
NULL
},
{
"AUX"
,
"
\\\\
.
\\
AUX"
,
NULL
},
{
"COM1"
,
"
\\\\
.
\\
COM1"
,
NULL
},
{
"?<>*
\"
|:"
,
"C:
\\
windows
\\
?<>*
\"
|:"
,
"?<>*
\"
|:"
},
...
...
@@ -471,6 +476,9 @@ static void test_RtlDosPathNameToNtPathName_U(void)
{
L"..."
,
L"
\\
??
\\
C:
\\
windows
\\
"
,
-
1
},
{
L"./foo"
,
L"
\\
??
\\
C:
\\
windows
\\
foo"
,
15
},
{
L"foo/.."
,
L"
\\
??
\\
C:
\\
windows"
,
7
},
{
L"
\\
windows
\\
nul"
,
L"
\\
??
\\
nul"
,
-
1
},
{
L"C:NUL."
,
L"
\\
??
\\
NUL"
,
-
1
},
{
L"C:NUL"
,
L"
\\
??
\\
NUL"
,
-
1
},
{
L"AUX"
,
L"
\\
??
\\
AUX"
,
-
1
},
{
L"COM1"
,
L"
\\
??
\\
COM1"
,
-
1
},
{
L"?<>*
\"
|:"
,
L"
\\
??
\\
C:
\\
windows
\\
?<>*
\"
|:"
,
15
},
...
...
@@ -551,32 +559,30 @@ static void test_RtlDosPathNameToNtPathName_U(void)
{
L"cOnOuT$"
,
L"
\\
??
\\
cOnOuT$"
,
-
1
,
L"
\\
??
\\
C:
\\
windows
\\
cOnOuT$"
/* winxp */
},
{
L"CONERR$"
,
L"
\\
??
\\
C:
\\
windows
\\
CONERR$"
,
15
},
};
static
const
WCHAR
*
error_paths
[]
=
{
NULL
,
L""
,
L" "
,
L"C:
\\
nonexistent
\\
nul"
,
L"C:
\\
con
\\
con"
};
GetCurrentDirectoryA
(
sizeof
(
curdir
),
curdir
);
SetCurrentDirectoryA
(
"C:
\\
windows
\\
"
);
ret
=
pRtlDosPathNameToNtPathName_U
(
NULL
,
&
nameW
,
&
file_part
,
NULL
);
ok
(
!
ret
,
"Got %d.
\n
"
,
ret
);
ret
=
pRtlDosPathNameToNtPathName_U
(
L""
,
&
nameW
,
&
file_part
,
NULL
);
ok
(
!
ret
,
"Got %d.
\n
"
,
ret
);
ret
=
pRtlDosPathNameToNtPathName_U
(
L" "
,
&
nameW
,
&
file_part
,
NULL
);
ok
(
!
ret
,
"Got %d.
\n
"
,
ret
);
if
(
pRtlDosPathNameToNtPathName_U_WithStatus
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
error_paths
);
++
i
)
{
status
=
pRtlDosPathNameToNtPathName_U_WithStatus
(
NULL
,
&
nameW
,
&
file_part
,
NULL
);
ok
(
status
==
STATUS_OBJECT_NAME_INVALID
||
status
==
STATUS_OBJECT_PATH_NOT_FOUND
/* 2003 */
,
"Got status %#x.
\n
"
,
status
);
winetest_push_context
(
"%s"
,
debugstr_w
(
error_paths
[
i
]));
status
=
pRtlDosPathNameToNtPathName_U_WithStatus
(
L""
,
&
nameW
,
&
file_part
,
NULL
);
ok
(
status
==
STATUS_OBJECT_NAME_INVALID
||
status
==
STATUS_OBJECT_PATH_NOT_FOUND
/* 2003 */
,
"Got status %#x.
\n
"
,
status
);
ret
=
pRtlDosPathNameToNtPathName_U
(
error_paths
[
i
],
&
nameW
,
&
file_part
,
NULL
);
todo_wine_if
(
i
==
3
||
i
==
4
)
ok
(
!
ret
,
"Got %d.
\n
"
,
ret
);
if
(
pRtlDosPathNameToNtPathName_U_WithStatus
)
{
status
=
pRtlDosPathNameToNtPathName_U_WithStatus
(
error_paths
[
i
],
&
nameW
,
&
file_part
,
NULL
);
todo_wine_if
(
i
==
3
||
i
==
4
)
ok
(
status
==
STATUS_OBJECT_NAME_INVALID
||
broken
(
status
==
STATUS_OBJECT_PATH_NOT_FOUND
/* 2003 */
),
"Got status %#x.
\n
"
,
status
);
}
status
=
pRtlDosPathNameToNtPathName_U_WithStatus
(
L" "
,
&
nameW
,
&
file_part
,
NULL
);
ok
(
status
==
STATUS_OBJECT_NAME_INVALID
||
status
==
STATUS_OBJECT_PATH_NOT_FOUND
/* 2003 */
,
"Got status %#x.
\n
"
,
status
);
winetest_pop_context
();
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
tests
);
++
i
)
...
...
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