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
e1757fca
Commit
e1757fca
authored
Sep 12, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 12, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add some more tests for MsiOpenDatabase.
parent
b6e6d4b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
1 deletion
+53
-1
db.c
dlls/msi/tests/db.c
+53
-1
No files found.
dlls/msi/tests/db.c
View file @
e1757fca
...
...
@@ -35,7 +35,7 @@ static const char *mstfile = "winetst.mst";
static
void
test_msidatabase
(
void
)
{
MSIHANDLE
hdb
=
0
;
MSIHANDLE
hdb
=
0
,
hdb2
=
0
;
UINT
res
;
DeleteFile
(
msifile
);
...
...
@@ -47,9 +47,61 @@ static void test_msidatabase(void)
res
=
MsiDatabaseCommit
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
ok
(
INVALID_FILE_ATTRIBUTES
!=
GetFileAttributes
(
msifile
),
"database should exist
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
todo_wine
{
res
=
MsiOpenDatabase
(
msifile
,
msifile2
,
&
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
ok
(
INVALID_FILE_ATTRIBUTES
!=
GetFileAttributes
(
msifile2
),
"database should exist
\n
"
);
res
=
MsiDatabaseCommit
(
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
}
res
=
MsiCloseHandle
(
hdb2
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_READONLY
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_DIRECT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_TRANSACT
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
todo_wine
{
ok
(
INVALID_FILE_ATTRIBUTES
!=
GetFileAttributes
(
msifile2
),
"database should exist
\n
"
);
/* MSIDBOPEN_CREATE deletes the database if MsiCommitDatabase isn't called */
res
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to open database
\n
"
);
res
=
MsiDatabaseCommit
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
res
=
MsiCloseHandle
(
hdb
);
ok
(
res
==
ERROR_SUCCESS
,
"Failed to close database
\n
"
);
res
=
DeleteFile
(
msifile2
);
ok
(
res
==
TRUE
,
"Failed to delete database
\n
"
);
}
res
=
DeleteFile
(
msifile
);
ok
(
res
==
TRUE
,
"Failed to delete database
\n
"
);
}
...
...
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