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
2beee126
Commit
2beee126
authored
Sep 29, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Test the Installed property.
parent
1b7d1d4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
1 deletion
+79
-1
custom.c
dlls/msi/custom.c
+1
-1
install.c
dlls/msi/tests/install.c
+78
-0
No files found.
dlls/msi/custom.c
View file @
2beee126
...
...
@@ -1055,7 +1055,7 @@ static UINT HANDLE_CustomType19(MSIPACKAGE *package, LPCWSTR source,
msi_free
(
deformated
);
return
ERROR_
FUNCTION_FAILED
;
return
ERROR_
INSTALL_FAILURE
;
}
static
UINT
HANDLE_CustomType50
(
MSIPACKAGE
*
package
,
LPCWSTR
source
,
...
...
dlls/msi/tests/install.c
View file @
2beee126
...
...
@@ -886,6 +886,32 @@ static const CHAR ai_file_dat[] = "File\tComponent_\tFileName\tFileSize\tVersion
"file
\t
component
\t
filename
\t
100
\t\t\t
8192
\t
1
\n
"
"service_file
\t
service_comp
\t
service.exe
\t
100
\t\t\t
8192
\t
1"
;
static
const
CHAR
ip_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"CostFinalize
\t\t
1000
\n
"
"ValidateProductID
\t\t
700
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"RemoveFiles
\t\t
3500
\n
"
"InstallFiles
\t\t
4000
\n
"
"RegisterUser
\t\t
6000
\n
"
"RegisterProduct
\t\t
6100
\n
"
"PublishFeatures
\t\t
6300
\n
"
"PublishProduct
\t\t
6400
\n
"
"InstallFinalize
\t\t
6600
\n
"
"InstallInitialize
\t\t
1500
\n
"
"ProcessComponents
\t\t
1600
\n
"
"UnpublishFeatures
\t\t
1800
\n
"
"InstallValidate
\t\t
1400
\n
"
"LaunchConditions
\t\t
100
\n
"
"TestInstalledProp
\t
Installed AND NOT REMOVE
\t
950
\n
"
;
static
const
CHAR
ip_custom_action_dat
[]
=
"Action
\t
Type
\t
Source
\t
Target
\t
ISComments
\n
"
"s72
\t
i2
\t
S64
\t
S0
\t
S255
\n
"
"CustomAction
\t
Action
\n
"
"TestInstalledProp
\t
19
\t\t
Test failed
\t\n
"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -1500,6 +1526,19 @@ static const msi_table pc_tables[] =
ADD_TABLE
(
property
)
};
static
const
msi_table
ip_tables
[]
=
{
ADD_TABLE
(
component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
feature
),
ADD_TABLE
(
feature_comp
),
ADD_TABLE
(
file
),
ADD_TABLE
(
ip_install_exec_seq
),
ADD_TABLE
(
ip_custom_action
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
)
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -6600,6 +6639,44 @@ static void test_preselected(void)
delete_test_files
();
}
static
void
test_installed_prop
(
void
)
{
static
char
prodcode
[]
=
"{7df88a48-996f-4ec8-a022-bf956f9b2cbb}"
;
UINT
r
;
create_test_files
();
create_database
(
msifile
,
ip_tables
,
sizeof
(
ip_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
"FULL=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiInstallProductA
(
msifile
,
"FULL=1"
);
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
r
=
MsiConfigureProductExA
(
prodcode
,
INSTALLLEVEL_DEFAULT
,
INSTALLSTATE_DEFAULT
,
"FULL=1"
);
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
cabout
\\
new
\\
five.txt"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
cabout
\\
new"
,
FALSE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
cabout
\\
four.txt"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
cabout"
,
FALSE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
changed
\\
three.txt"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
changed"
,
FALSE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
first
\\
two.txt"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
first"
,
FALSE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
filename"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
one.txt"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
service.exe"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
delete_test_files
();
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -6685,6 +6762,7 @@ START_TEST(install)
test_envvar
();
test_lastusedsource
();
test_preselected
();
test_installed_prop
();
DeleteFileA
(
log_file
);
...
...
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