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
c2ce5614
Commit
c2ce5614
authored
May 25, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
May 25, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a test for properties updated by a patch.
parent
c815432a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
5 deletions
+60
-5
patch.c
dlls/msi/tests/patch.c
+60
-5
No files found.
dlls/msi/tests/patch.c
View file @
c2ce5614
...
...
@@ -54,7 +54,8 @@ static const char property_dat[] =
"UpgradeCode
\t
{A2E3D643-4E2C-477F-A309-F76F552D5F43}
\n
"
"ProductLanguage
\t
1033
\n
"
"ProductName
\t
msitest
\n
"
"ProductVersion
\t
1.1.1
\n
"
;
"ProductVersion
\t
1.1.1
\n
"
"PATCHNEWSUMMARYSUBJECT
\t
Installer Database
\n
"
;
static
const
char
media_dat
[]
=
"DiskId
\t
LastSequence
\t
DiskPrompt
\t
Cabinet
\t
VolumeLabel
\t
Source
\n
"
...
...
@@ -708,6 +709,48 @@ static void test_simple_patch( void )
"InstallSource"
,
install_source
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
strcpy
(
path
,
CURR_DIR
);
strcat
(
path
,
"
\\
"
);
strcat
(
path
,
msifile
);
r
=
MsiOpenPackageA
(
path
,
&
hpackage
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
hdb
=
MsiGetActiveDatabase
(
hpackage
);
ok
(
hdb
,
"failed to get database handle
\n
"
);
query
=
"SELECT * FROM `Property` where `Property` = 'PATCHNEWPACKAGECODE'"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
ok
(
r
==
ERROR_NO_MORE_ITEMS
,
"expected ERROR_NO_MORE_ITEMS, got %u
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
query
=
"SELECT * FROM `Property` WHERE `Property` = 'PATCHNEWSUMMARYSUBJECT' "
"AND `Value` = 'Installer Database'"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
hpackage
);
r
=
MsiApplyPatchA
(
mspfile
,
NULL
,
INSTALLTYPE_DEFAULT
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
||
broken
(
r
==
ERROR_PATCH_PACKAGE_INVALID
),
/* version 2.0 */
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -721,10 +764,6 @@ static void test_simple_patch( void )
size
=
get_pf_file_size
(
"msitest
\\
patch.txt"
);
ok
(
size
==
1002
,
"expected 1002, got %u
\n
"
,
size
);
strcpy
(
path
,
CURR_DIR
);
strcat
(
path
,
"
\\
"
);
strcat
(
path
,
msifile
);
/* show that MsiOpenPackage applies registered patches */
r
=
MsiOpenPackageA
(
path
,
&
hpackage
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
...
...
@@ -745,6 +784,22 @@ static void test_simple_patch( void )
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
query
=
"SELECT * FROM `Property` WHERE `Property` = 'PATCHNEWSUMMARYSUBJECT' "
"AND `Value` = 'Installation Database'"
;
r
=
MsiDatabaseOpenView
(
hdb
,
query
,
&
hview
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewExecute
(
hview
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiViewFetch
(
hview
,
&
hrec
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %u
\n
"
,
r
);
MsiCloseHandle
(
hrec
);
MsiViewClose
(
hview
);
MsiCloseHandle
(
hview
);
MsiCloseHandle
(
hdb
);
MsiCloseHandle
(
hpackage
);
...
...
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