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
b90ef8c6
Commit
b90ef8c6
authored
Oct 30, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add some BackupEventLog tests.
parent
f2aa80f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
eventlog.c
dlls/advapi32/tests/eventlog.c
+49
-0
No files found.
dlls/advapi32/tests/eventlog.c
View file @
b90ef8c6
...
...
@@ -215,6 +215,54 @@ static void test_oldest(void)
CloseEventLog
(
handle
);
}
static
void
test_backup
(
void
)
{
HANDLE
handle
;
BOOL
ret
;
const
char
backup
[]
=
"backup.evt"
;
SetLastError
(
0xdeadbeef
);
ret
=
BackupEventLogA
(
NULL
,
NULL
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
}
SetLastError
(
0xdeadbeef
);
ret
=
BackupEventLogA
(
NULL
,
backup
);
todo_wine
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetFileAttributesA
(
backup
)
==
INVALID_FILE_ATTRIBUTES
,
"Expected no backup file
\n
"
);
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
SetLastError
(
0xdeadbeef
);
ret
=
BackupEventLogA
(
handle
,
NULL
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
}
ret
=
BackupEventLogA
(
handle
,
backup
);
ok
(
ret
,
"Expected succes
\n
"
);
todo_wine
ok
(
GetFileAttributesA
(
"backup.evt"
)
!=
INVALID_FILE_ATTRIBUTES
,
"Expected a backup file
\n
"
);
/* Try to overwrite */
SetLastError
(
0xdeadbeef
);
ret
=
BackupEventLogA
(
handle
,
backup
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_ALREADY_EXISTS
,
"Expected ERROR_ALREADY_EXISTS, got %d
\n
"
,
GetLastError
());
}
CloseEventLog
(
handle
);
DeleteFileA
(
backup
);
}
START_TEST
(
eventlog
)
{
SetLastError
(
0xdeadbeef
);
...
...
@@ -232,4 +280,5 @@ START_TEST(eventlog)
test_info
();
test_count
();
test_oldest
();
test_backup
();
}
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