Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
1a00dfe4
Commit
1a00dfe4
authored
Jun 28, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add some tests for trailing slashes in paths.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cdeaf7c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
file.c
dlls/ntdll/tests/file.c
+15
-0
path.c
dlls/ntdll/tests/path.c
+11
-0
No files found.
dlls/ntdll/tests/file.c
View file @
1a00dfe4
...
@@ -4251,6 +4251,21 @@ static void test_NtCreateFile(void)
...
@@ -4251,6 +4251,21 @@ static void test_NtCreateFile(void)
pRtlFreeUnicodeString
(
&
nameW
);
pRtlFreeUnicodeString
(
&
nameW
);
SetFileAttributesW
(
path
,
FILE_ATTRIBUTE_ARCHIVE
);
SetFileAttributesW
(
path
,
FILE_ATTRIBUTE_ARCHIVE
);
DeleteFileW
(
path
);
DeleteFileW
(
path
);
wcscat
(
path
,
L"
\\
"
);
pRtlDosPathNameToNtPathName_U
(
path
,
&
nameW
,
NULL
,
NULL
);
status
=
pNtCreateFile
(
&
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
NULL
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_CREATE
,
0
,
NULL
,
0
);
todo_wine
ok
(
status
==
STATUS_OBJECT_NAME_INVALID
,
"failed %s %lx
\n
"
,
debugstr_w
(
nameW
.
Buffer
),
status
);
if
(
!
status
)
DeleteFileW
(
path
);
status
=
pNtCreateFile
(
&
handle
,
GENERIC_READ
,
&
attr
,
&
io
,
NULL
,
0
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
FILE_CREATE
,
FILE_DIRECTORY_FILE
,
NULL
,
0
);
todo_wine
ok
(
!
status
,
"failed %s %lx
\n
"
,
debugstr_w
(
nameW
.
Buffer
),
status
);
if
(
!
status
)
RemoveDirectoryW
(
path
);
}
}
static
void
test_read_write
(
void
)
static
void
test_read_write
(
void
)
...
...
dlls/ntdll/tests/path.c
View file @
1a00dfe4
...
@@ -648,8 +648,14 @@ static void test_nt_names(void)
...
@@ -648,8 +648,14 @@ static void test_nt_names(void)
{
NULL
,
L"/??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_PATH_SYNTAX_BAD
},
{
NULL
,
L"/??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_PATH_SYNTAX_BAD
},
{
NULL
,
L"
\\
??"
L"/C:
\\
windows
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
NULL
,
L"
\\
??"
L"/C:
\\
windows
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:/windows
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:/windows
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
"
,
STATUS_FILE_IS_A_DIRECTORY
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
SyStEm32
\\
"
,
STATUS_FILE_IS_A_DIRECTORY
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\\\
"
,
STATUS_OBJECT_NAME_INVALID
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
foobar
\\
"
,
STATUS_OBJECT_NAME_NOT_FOUND
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
Kernel32.Dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
system32
\\
Kernel32.Dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
sys
\001
"
,
STATUS_OBJECT_NAME_INVALID
},
{
NULL
,
L"
\\
??
\\
C:
\\
windows
\\
sys
\001
"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
"
,
NULL
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
"
,
NULL
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
"
,
NULL
,
STATUS_SUCCESS
},
{
L"
\\
??
\\
C:
\\
"
,
NULL
,
STATUS_SUCCESS
},
...
@@ -669,8 +675,13 @@ static void test_nt_names(void)
...
@@ -669,8 +675,13 @@ static void test_nt_names(void)
{
L"
\\
??
\\
C:
\\
windows"
,
L"system32
\\
kernel32.dll"
,
STATUS_SUCCESS
},
{
L"
\\
??
\\
C:
\\
windows"
,
L"system32
\\
kernel32.dll"
,
STATUS_SUCCESS
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll"
,
STATUS_SUCCESS
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll"
,
STATUS_SUCCESS
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
"
,
STATUS_FILE_IS_A_DIRECTORY
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
"
,
STATUS_FILE_IS_A_DIRECTORY
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"SyStEm32
\\
"
,
STATUS_FILE_IS_A_DIRECTORY
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\\\
"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
foobar
\\
"
,
STATUS_OBJECT_NAME_NOT_FOUND
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
kernel32.dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
Kernel32.Dll
\\
"
,
STATUS_OBJECT_NAME_INVALID
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"system32
\\
Kernel32.Dll
\\
foo"
,
STATUS_OBJECT_PATH_NOT_FOUND
,
0
,
TRUE
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"
\\
system32
\\
kernel32.dll"
,
STATUS_INVALID_PARAMETER
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"
\\
system32
\\
kernel32.dll"
,
STATUS_INVALID_PARAMETER
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"/system32
\\
kernel32.dll"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L"/system32
\\
kernel32.dll"
,
STATUS_OBJECT_NAME_INVALID
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L".
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_NAME_INVALID
,
STATUS_OBJECT_PATH_NOT_FOUND
},
{
L"
\\
??
\\
C:
\\
windows
\\
"
,
L".
\\
system32
\\
kernel32.dll"
,
STATUS_OBJECT_NAME_INVALID
,
STATUS_OBJECT_PATH_NOT_FOUND
},
...
...
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