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
5395c999
Commit
5395c999
authored
May 20, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
May 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add more tests for feature overrides.
parent
e16f1877
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
119 additions
and
15 deletions
+119
-15
install.c
dlls/msi/tests/install.c
+119
-15
No files found.
dlls/msi/tests/install.c
View file @
5395c999
...
...
@@ -1413,6 +1413,63 @@ static const CHAR crs_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
CHAR
fo_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
"override.txt
\t
override
\t
override.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
"preselected.txt
\t
preselected
\t
preselected.txt
\t
1000
\t\t\t
8192
\t
2
\n
"
"notpreselected.txt
\t
notpreselected
\t
notpreselected.txt
\t
1000
\t\t\t
8192
\t
3
\n
"
;
static
const
CHAR
fo_feature_dat
[]
=
"Feature
\t
Feature_Parent
\t
Title
\t
Description
\t
Display
\t
Level
\t
Directory_
\t
Attributes
\n
"
"s38
\t
S38
\t
L64
\t
L255
\t
I2
\t
i2
\t
S72
\t
i2
\n
"
"Feature
\t
Feature
\n
"
"override
\t\t\t
override feature
\t
1
\t
1
\t
MSITESTDIR
\t
0
\n
"
"preselected
\t\t\t
preselected feature
\t
1
\t
1
\t
MSITESTDIR
\t
0
\n
"
"notpreselected
\t\t\t
notpreselected feature
\t
1
\t
1
\t
MSITESTDIR
\t
0
\n
"
;
static
const
CHAR
fo_condition_dat
[]
=
"Feature_
\t
Level
\t
Condition
\n
"
"s38
\t
i2
\t
S255
\n
"
"Condition
\t
Feature_
\t
Level
\n
"
"preselected
\t
0
\t
Preselected
\n
"
"notpreselected
\t
0
\t
NOT Preselected
\n
"
;
static
const
CHAR
fo_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"override
\t
override
\n
"
"preselected
\t
preselected
\n
"
"notpreselected
\t
notpreselected
\n
"
;
static
const
CHAR
fo_component_dat
[]
=
"Component
\t
ComponentId
\t
Directory_
\t
Attributes
\t
Condition
\t
KeyPath
\n
"
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"override
\t
{0A00FB1D-97B0-4B42-ADF0-BB8913416623}
\t
MSITESTDIR
\t
0
\t\t
override.txt
\n
"
"preselected
\t
{44E1DB75-605A-43DD-8CF5-CAB17F1BBD60}
\t
MSITESTDIR
\t
0
\t\t
preselected.txt
\n
"
"notpreselected
\t
{E1647733-5E75-400A-A92E-5E60B4D4EF9F}
\t
MSITESTDIR
\t
0
\t\t
notpreselected.txt
\n
"
;
static
const
CHAR
fo_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
"
"SetPreselected
\t
51
\t
Preselected
\t
1
\t\n
"
;
static
const
CHAR
fo_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"LaunchConditions
\t\t
100
\n
"
"SetPreselected
\t
preselect=1
\t
200
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"CostFinalize
\t\t
1000
\n
"
"InstallValidate
\t\t
1400
\n
"
"InstallInitialize
\t\t
1500
\n
"
"ProcessComponents
\t\t
1600
\n
"
"RemoveFiles
\t\t
1700
\n
"
"InstallFiles
\t\t
2000
\n
"
"RegisterProduct
\t\t
5000
\n
"
"PublishFeatures
\t\t
5100
\n
"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
CHAR
pub_file_dat
[]
=
"File
\t
Component_
\t
FileName
\t
FileSize
\t
Version
\t
Language
\t
Attributes
\t
Sequence
\n
"
"s72
\t
s72
\t
l255
\t
i4
\t
S72
\t
S20
\t
I2
\t
i2
\n
"
"File
\t
File
\n
"
...
...
@@ -2822,6 +2879,20 @@ static const msi_table rmi_tables[] =
ADD_TABLE
(
property
)
};
static
const
msi_table
fo_tables
[]
=
{
ADD_TABLE
(
directory
),
ADD_TABLE
(
fo_file
),
ADD_TABLE
(
fo_component
),
ADD_TABLE
(
fo_feature
),
ADD_TABLE
(
fo_condition
),
ADD_TABLE
(
fo_feature_comp
),
ADD_TABLE
(
fo_custom_action
),
ADD_TABLE
(
fo_install_exec_seq
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
)
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -8384,27 +8455,60 @@ static void test_feature_override(void)
UINT
r
;
create_test_files
();
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
msi_table
));
create_file
(
"msitest
\\
override.txt"
,
1000
);
create_file
(
"msitest
\\
preselected.txt"
,
1000
);
create_file
(
"msitest
\\
notpreselected.txt"
,
1000
);
create_database
(
msifile
,
fo_tables
,
sizeof
(
fo_tables
)
/
sizeof
(
msi_table
));
r
=
MsiInstallProductA
(
msifile
,
"ADDLOCAL=
On
e"
);
r
=
MsiInstallProductA
(
msifile
,
"ADDLOCAL=
overrid
e"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
cabout
\\
new
\\
five.txt"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
cabout
\\
new"
,
FALSE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
cabout
\\
four.txt"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
cabout"
,
FALSE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
changed
\\
three.txt"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
changed"
,
FALSE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
first
\\
two.txt"
,
TRUE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
first"
,
FALSE
),
"File installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
filename"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
one.txt"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
service.exe"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
override.txt"
),
"file not installed
\n
"
);
ok
(
!
pf_exists
(
"msitest
\\
preselected.txt"
),
"file installed
\n
"
);
ok
(
!
pf_exists
(
"msitest
\\
notpreselected.txt"
),
"file installed
\n
"
);
delete_test_files
();
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
override.txt"
,
TRUE
),
"file not removed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"preselect=1"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
override.txt"
),
"file not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
preselected.txt"
),
"file not installed
\n
"
);
ok
(
!
pf_exists
(
"msitest
\\
notpreselected.txt"
),
"file installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
override.txt"
,
TRUE
),
"file not removed
\n
"
);
todo_wine
{
ok
(
delete_pf
(
"msitest
\\
preselected.txt"
,
TRUE
),
"file removed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"directory removed
\n
"
);
}
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
pf_exists
(
"msitest
\\
override.txt"
),
"file not installed
\n
"
);
ok
(
pf_exists
(
"msitest
\\
preselected.txt"
),
"file not installed
\n
"
);
ok
(
!
pf_exists
(
"msitest
\\
notpreselected.txt"
),
"file installed
\n
"
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
override.txt"
,
TRUE
),
"file not removed
\n
"
);
todo_wine
{
ok
(
delete_pf
(
"msitest
\\
preselected.txt"
,
TRUE
),
"file removed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"directory removed
\n
"
);
}
DeleteFileA
(
"msitest
\\
override.txt"
);
DeleteFileA
(
"msitest
\\
preselected.txt"
);
DeleteFileA
(
"msitest
\\
notpreselected.txt"
);
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
msitest"
);
delete_test_files
();
}
static
void
test_create_folder
(
void
)
...
...
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