Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Damjan Jovanovic
wine
Commits
d998543e
Commit
d998543e
authored
18 years ago
by
Michael McCormack
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
msi: Add a short test for transforms.
parent
12baa13b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/msi/tests/db.c
+66
-0
66 additions, 0 deletions
dlls/msi/tests/db.c
with
66 additions
and
0 deletions
dlls/msi/tests/db.c
+
66
−
0
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
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment