Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d998543e
Commit
d998543e
authored
Sep 01, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Sep 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a short test for transforms.
parent
12baa13b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
db.c
dlls/msi/tests/db.c
+66
-0
No files found.
dlls/msi/tests/db.c
View file @
d998543e
...
...
@@ -26,6 +26,12 @@
#include "wine/test.h"
static
const
char
*
msifile
=
"winetest.msi"
;
static
const
char
*
msifile2
=
"winetst2.msi"
;
static
const
char
*
mstfile
=
"winetst.mst"
;
#ifndef ERROR_INSTALL_TRANSFORM_FAILURE
#define ERROR_INSTALL_TRANSFORM_FAILURE 1624
#endif
static
void
test_msidatabase
(
void
)
{
...
...
@@ -1392,6 +1398,65 @@ static void test_handle_limit(void)
ok
(
r
==
ERROR_SUCCESS
,
"failed to close database
\n
"
);
}
static
void
test_generate_transform
(
void
)
{
MSIHANDLE
hdb1
,
hdb2
;
LPCSTR
query
;
UINT
r
;
DeleteFile
(
msifile
);
DeleteFile
(
msifile2
);
DeleteFile
(
mstfile
);
/* create an empty database */
r
=
MsiOpenDatabase
(
msifile
,
MSIDBOPEN_CREATE
,
&
hdb1
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
r
=
MsiDatabaseCommit
(
hdb1
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
/* create another empty database */
r
=
MsiOpenDatabase
(
msifile2
,
MSIDBOPEN_CREATE
,
&
hdb2
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to create database
\n
"
);
r
=
MsiDatabaseCommit
(
hdb2
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to commit database
\n
"
);
/* the transform between two empty database should be empty */
r
=
MsiDatabaseGenerateTransform
(
hdb1
,
hdb2
,
NULL
,
0
,
0
);
todo_wine
{
ok
(
r
==
ERROR_NO_DATA
,
"return code %d, should be ERROR_NO_DATA
\n
"
,
r
);
}
query
=
"CREATE TABLE `AAR` ( `BAR` SHORT NOT NULL, `CAR` CHAR(255) PRIMARY KEY `CAR`)"
;
r
=
run_query
(
hdb1
,
0
,
query
);
ok
(
r
==
ERROR_SUCCESS
,
"failed to add table
\n
"
);
todo_wine
{
r
=
MsiDatabaseGenerateTransform
(
hdb1
,
hdb2
,
NULL
,
0
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"return code %d, should be ERROR_SUCCESS
\n
"
,
r
);
r
=
MsiDatabaseGenerateTransform
(
hdb1
,
hdb2
,
mstfile
,
0
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"return code %d, should be ERROR_SUCCESS
\n
"
,
r
);
MsiCloseHandle
(
hdb1
);
r
=
MsiDatabaseApplyTransform
(
hdb2
,
mstfile
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"return code %d, should be ERROR_SUCCESS
\n
"
,
r
);
/* apply the same transform again? */
r
=
MsiDatabaseApplyTransform
(
hdb2
,
mstfile
,
0
);
ok
(
r
==
ERROR_INSTALL_TRANSFORM_FAILURE
,
"return code %d, should be ERROR_INSTALL_TRANSFORM_FAILURE
\n
"
,
r
);
}
MsiCloseHandle
(
hdb2
);
DeleteFile
(
msifile
);
DeleteFile
(
msifile2
);
DeleteFile
(
mstfile
);
}
START_TEST
(
db
)
{
test_msidatabase
();
...
...
@@ -1408,4 +1473,5 @@ START_TEST(db)
test_msiimport
();
test_markers
();
test_handle_limit
();
test_generate_transform
();
}
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