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
f39c64a8
Commit
f39c64a8
authored
Dec 20, 2013
by
Zhenbo Li
Committed by
Alexandre Julliard
Dec 23, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add some tests for DeleteFileA.
parent
3740b2bb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
file.c
dlls/kernel32/tests/file.c
+12
-0
No files found.
dlls/kernel32/tests/file.c
View file @
f39c64a8
...
@@ -1632,6 +1632,9 @@ static void test_DeleteFileA( void )
...
@@ -1632,6 +1632,9 @@ static void test_DeleteFileA( void )
GetLastError
()
==
ERROR_INVALID_FUNCTION
),
GetLastError
()
==
ERROR_INVALID_FUNCTION
),
"DeleteFileA(
\"
nul
\"
) returned ret=%d error=%d
\n
"
,
ret
,
GetLastError
());
"DeleteFileA(
\"
nul
\"
) returned ret=%d error=%d
\n
"
,
ret
,
GetLastError
());
ret
=
DeleteFileA
(
"nonexist.txt"
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"DeleteFileA(
\"
nonexist.txt
\"
) returned ret=%d error=%d
\n
"
,
ret
,
GetLastError
());
GetTempPathA
(
MAX_PATH
,
temp_path
);
GetTempPathA
(
MAX_PATH
,
temp_path
);
GetTempFileNameA
(
temp_path
,
"tst"
,
0
,
temp_file
);
GetTempFileNameA
(
temp_path
,
"tst"
,
0
,
temp_file
);
...
@@ -1650,6 +1653,15 @@ todo_wine
...
@@ -1650,6 +1653,15 @@ todo_wine
ret
=
DeleteFileA
(
temp_file
);
ret
=
DeleteFileA
(
temp_file
);
todo_wine
todo_wine
ok
(
!
ret
,
"DeleteFile should fail
\n
"
);
ok
(
!
ret
,
"DeleteFile should fail
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
CreateDirectoryA
(
"testdir"
,
NULL
);
ok
(
ret
,
"CreateDirectory failed, got err %d
\n
"
,
GetLastError
());
ret
=
DeleteFileA
(
"testdir"
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_ACCESS_DENIED
,
"Expected ERROR_ACCESS_DENIED, got error %d
\n
"
,
GetLastError
());
ret
=
RemoveDirectoryA
(
"testdir"
);
ok
(
ret
,
"Remove a directory failed, got error %d
\n
"
,
GetLastError
());
}
}
static
void
test_DeleteFileW
(
void
)
static
void
test_DeleteFileW
(
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