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
bbafba6d
Commit
bbafba6d
authored
Aug 23, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Aug 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add more tests for RtlGetFullPathName_U().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ee5c46a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
7 deletions
+49
-7
path.c
dlls/ntdll/tests/path.c
+49
-7
No files found.
dlls/ntdll/tests/path.c
View file @
bbafba6d
...
...
@@ -266,6 +266,7 @@ static void test_RtlGetFullPathName_U(void)
static
const
struct
test
tests
[]
=
{
{
"c:/test"
,
"c:
\\
test"
,
"test"
},
{
"c:/test/"
,
"c:
\\
test
\\
"
,
NULL
},
{
"c:/test "
,
"c:
\\
test"
,
"test"
},
{
"c:/test."
,
"c:
\\
test"
,
"test"
},
{
"c:/test .... .. "
,
"c:
\\
test"
,
"test"
},
...
...
@@ -287,22 +288,61 @@ static void test_RtlGetFullPathName_U(void)
{
"c:/test../file"
,
"c:
\\
test.
\\
file"
,
"file"
,
"c:
\\
test..
\\
file"
,
"file"
},
/* vista */
{
"c:
\\
test"
,
"c:
\\
test"
,
"test"
},
{
NULL
,
NULL
,
NULL
}
{
"C:
\\
test"
,
"C:
\\
test"
,
"test"
},
{
"c:/"
,
"c:
\\
"
,
NULL
},
{
"c:."
,
"C:
\\
windows"
,
"windows"
},
{
"c:foo"
,
"C:
\\
windows
\\
foo"
,
"foo"
},
{
"c:foo/bar"
,
"C:
\\
windows
\\
foo
\\
bar"
,
"bar"
},
{
"c:./foo"
,
"C:
\\
windows
\\
foo"
,
"foo"
},
{
"
\\
foo"
,
"C:
\\
foo"
,
"foo"
},
{
"foo"
,
"C:
\\
windows
\\
foo"
,
"foo"
},
{
"."
,
"C:
\\
windows"
,
"windows"
},
{
".."
,
"C:
\\
"
,
NULL
},
{
"..."
,
"C:
\\
windows
\\
"
,
NULL
},
{
"./foo"
,
"C:
\\
windows
\\
foo"
,
"foo"
},
{
"foo/.."
,
"C:
\\
windows"
,
"windows"
},
{
"AUX"
,
"
\\\\
.
\\
AUX"
,
NULL
},
{
"COM1"
,
"
\\\\
.
\\
COM1"
,
NULL
},
{
"?<>*
\"
|:"
,
"C:
\\
windows
\\
?<>*
\"
|:"
,
"?<>*
\"
|:"
},
{
"
\\\\
foo"
,
"
\\\\
foo"
,
NULL
},
{
"//foo"
,
"
\\\\
foo"
,
NULL
},
{
"
\\
/foo"
,
"
\\\\
foo"
,
NULL
},
{
"//"
,
"
\\\\
"
,
NULL
},
{
"//foo/"
,
"
\\\\
foo
\\
"
,
NULL
},
{
"//."
,
"
\\\\
.
\\
"
,
NULL
},
{
"//./"
,
"
\\\\
.
\\
"
,
NULL
},
{
"//.//"
,
"
\\\\
.
\\
"
,
NULL
},
{
"//./foo"
,
"
\\\\
.
\\
foo"
,
"foo"
},
{
"//./foo/"
,
"
\\\\
.
\\
foo
\\
"
,
NULL
},
{
"//./foo/bar"
,
"
\\\\
.
\\
foo
\\
bar"
,
"bar"
},
{
"//./foo/."
,
"
\\\\
.
\\
foo"
,
"foo"
},
{
"//./foo/.."
,
"
\\\\
.
\\
"
,
NULL
},
{
"//?/"
,
"
\\\\
?
\\
"
,
NULL
},
{
"//?//"
,
"
\\\\
?
\\
"
,
NULL
},
{
"//?/foo"
,
"
\\\\
?
\\
foo"
,
"foo"
},
{
"//?/foo/"
,
"
\\\\
?
\\
foo
\\
"
,
NULL
},
{
"//?/foo/bar"
,
"
\\\\
?
\\
foo
\\
bar"
,
"bar"
},
{
"//?/foo/."
,
"
\\\\
?
\\
foo"
,
"foo"
},
{
"//?/foo/.."
,
"
\\\\
?
\\
"
,
NULL
},
/* RtlGetFullPathName_U() can't understand the global namespace prefix */
{
"
\\
??
\\
foo"
,
"C:
\\
??
\\
foo"
,
"foo"
},
{
0
}
};
const
struct
test
*
test
;
WCHAR
pathbufW
[
2
*
MAX_PATH
],
rbufferW
[
MAX_PATH
];
CHAR
rbufferA
[
MAX_PATH
],
rfileA
[
MAX_PATH
];
char
rbufferA
[
MAX_PATH
],
rfileA
[
MAX_PATH
],
curdir
[
MAX_PATH
];
ULONG
ret
;
WCHAR
*
file_part
;
DWORD
reslen
;
UINT
len
;
if
(
!
pRtlGetFullPathName_U
)
{
win_skip
(
"RtlGetFullPathName_U is not available
\n
"
);
return
;
}
GetCurrentDirectoryA
(
sizeof
(
curdir
),
curdir
);
SetCurrentDirectoryA
(
"C:
\\
windows
\\
"
);
file_part
=
(
WCHAR
*
)
0xdeadbeef
;
lstrcpyW
(
rbufferW
,
deadbeefW
);
...
...
@@ -348,6 +388,8 @@ static void test_RtlGetFullPathName_U(void)
ok
(
!
test
->
rfile
,
"Got NULL expected
\"
%s
\"\n
"
,
test
->
rfile
);
}
}
SetCurrentDirectoryA
(
curdir
);
}
static
void
test_RtlDosPathNameToNtPathName_U_WithStatus
(
void
)
...
...
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