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
e8d36ff9
Commit
e8d36ff9
authored
Feb 03, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Print some more details on directory test failures.
parent
69a8066b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
directory.c
dlls/kernel32/tests/directory.c
+16
-9
No files found.
dlls/kernel32/tests/directory.c
View file @
e8d36ff9
...
...
@@ -339,27 +339,32 @@ static void test_CreateDirectoryW(void)
ret
=
CreateDirectoryW
(
NULL
,
NULL
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
return
;
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"should not create NULL path
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"should not create NULL path ret %u err %u
\n
"
,
ret
,
GetLastError
());
ret
=
CreateDirectoryW
(
empty_strW
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"should not create empty path
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"should not create empty path ret %u err %u
\n
"
,
ret
,
GetLastError
());
ret
=
GetSystemDirectoryW
(
tmpdir
,
MAX_PATH
);
ok
(
ret
<
MAX_PATH
,
"System directory should fit into MAX_PATH
\n
"
);
ret
=
SetCurrentDirectoryW
(
tmpdir
);
ok
(
ret
==
TRUE
,
"could not chdir to the System directory
\n
"
);
ok
(
ret
==
TRUE
,
"could not chdir to the System directory
ret %u err %u
\n
"
,
ret
,
GetLastError
()
);
ret
=
CreateDirectoryW
(
dotW
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"should not create existing path
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"should not create existing path ret %u err %u
\n
"
,
ret
,
GetLastError
());
ret
=
CreateDirectoryW
(
dotdotW
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"should not create existing path
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"should not create existing path ret %u err %u
\n
"
,
ret
,
GetLastError
());
GetTempPathW
(
MAX_PATH
,
tmpdir
);
tmpdir
[
3
]
=
0
;
/* truncate the path */
ret
=
CreateDirectoryW
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"should deny access to the drive root
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"should deny access to the drive root ret %u err %u
\n
"
,
ret
,
GetLastError
());
GetTempPathW
(
MAX_PATH
,
tmpdir
);
lstrcatW
(
tmpdir
,
tmp_dir_name
);
...
...
@@ -367,7 +372,8 @@ static void test_CreateDirectoryW(void)
ok
(
ret
==
TRUE
,
"CreateDirectoryW should always succeed
\n
"
);
ret
=
CreateDirectoryW
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"should not create existing path
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"should not create existing path ret %u err %u
\n
"
,
ret
,
GetLastError
());
ret
=
RemoveDirectoryW
(
tmpdir
);
ok
(
ret
==
TRUE
,
"RemoveDirectoryW should always succeed
\n
"
);
...
...
@@ -391,8 +397,9 @@ static void test_CreateDirectoryW(void)
lstrcatW
(
tmpdir
,
slashW
);
lstrcatW
(
tmpdir
,
tmp_dir_name
);
ret
=
CreateDirectoryW
(
tmpdir
,
NULL
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"CreateDirectoryW with multiple nonexistent directories in path should fail
\n
"
);
ok
(
ret
==
FALSE
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"CreateDirectoryW with multiple nonexistent directories in path should fail ret %u err %u
\n
"
,
ret
,
GetLastError
());
ret
=
RemoveDirectoryW
(
tmpdir
);
}
...
...
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