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
56129f25
Commit
56129f25
authored
Jul 02, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Jul 03, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests to show when the SourceList is published to the registry.
parent
04c67c2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
109 additions
and
0 deletions
+109
-0
install.c
dlls/msi/tests/install.c
+109
-0
No files found.
dlls/msi/tests/install.c
View file @
56129f25
...
...
@@ -2159,6 +2159,114 @@ static void test_publish(void)
RemoveDirectory
(
"msitest"
);
}
static
void
test_publishsourcelist
(
void
)
{
UINT
r
;
DWORD
size
;
CHAR
value
[
MAX_PATH
];
CHAR
prodcode
[]
=
"{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"
;
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
maximus"
,
500
);
create_database
(
msifile
,
pp_tables
,
sizeof
(
pp_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_FULL
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
/* nothing published */
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"REGISTER_PRODUCT=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
/* after RegisterProduct */
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"PROCESS_COMPONENTS=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
/* after ProcessComponents */
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"PUBLISH_FEATURES=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
/* after PublishFeatures */
size
=
0xdeadbeef
;
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
NULL
,
&
size
);
todo_wine
{
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"Expected ERROR_UNKNOWN_PRODUCT, got %d
\n
"
,
r
);
ok
(
size
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
size
);
}
r
=
MsiInstallProductA
(
msifile
,
"PUBLISH_PRODUCT=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
maximus"
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest"
),
"File not installed
\n
"
);
/* after PublishProduct */
size
=
MAX_PATH
;
lstrcpyA
(
value
,
"aaa"
);
r
=
MsiSourceListGetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_USERUNMANAGED
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_PACKAGENAME
,
value
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
lstrcmpA
(
value
,
"msitest.msi"
),
"Expected 'msitest.msi', got %s
\n
"
,
value
);
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
}
/* complete uninstall */
r
=
MsiInstallProductA
(
msifile
,
"FULL=1 REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
todo_wine
{
ok
(
!
pf_exists
(
"msitest
\\
maximus"
),
"File not deleted
\n
"
);
ok
(
!
pf_exists
(
"msitest"
),
"File not deleted
\n
"
);
}
/* make sure 'Program Files\msitest' is removed */
delete_pfmsitest_files
();
DeleteFile
(
msifile
);
DeleteFile
(
"msitest
\\
maximus"
);
RemoveDirectory
(
"msitest"
);
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -2190,6 +2298,7 @@ START_TEST(install)
test_concurrentinstall
();
test_setpropertyfolder
();
test_publish
();
test_publishsourcelist
();
SetCurrentDirectoryA
(
prev_path
);
}
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