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
90158af2
Commit
90158af2
authored
Apr 02, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for registering and unregistering class info.
parent
cf75d40d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
0 deletions
+108
-0
install.c
dlls/msi/tests/install.c
+108
-0
No files found.
dlls/msi/tests/install.c
View file @
90158af2
...
...
@@ -1696,6 +1696,55 @@ static const CHAR res_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
CHAR
rci_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
"
"class.txt
\t
class
\t
class.txt
\t
1000
\t\t\t
8192
\t
1
\n
"
;
static
const
CHAR
rci_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
"
"class
\t\t\t
class feature
\t
1
\t
2
\t
MSITESTDIR
\t
0
\n
"
;
static
const
CHAR
rci_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"class
\t
class
\n
"
;
static
const
CHAR
rci_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
"
"class
\t
{89A98345-F8A1-422E-A48B-0250B5809F2D}
\t
MSITESTDIR
\t
0
\t\t
class.txt
\n
"
;
static
const
CHAR
rci_appid_dat
[]
=
"AppId
\t
RemoteServerName
\t
LocalService
\t
ServiceParameters
\t
DllSurrogate
\t
ActivateAtStorage
\t
RunAsInteractiveUser
\n
"
"s38
\t
S255
\t
S255
\t
S255
\t
S255
\t
I2
\t
I2
\n
"
"AppId
\t
AppId
\n
"
"{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}
\t\t\t\t\t\t\n
"
;
static
const
CHAR
rci_class_dat
[]
=
"CLSID
\t
Context
\t
Component_
\t
ProgId_Default
\t
Description
\t
AppId_
\t
FileTypeMask
\t
Icon_
\t
IconIndex
\t
DefInprocHandler
\t
Argument
\t
Feature_
\t
Attributes
\n
"
"s38
\t
s32
\t
s72
\t
S255
\t
L255
\t
S38
\t
S255
\t
S72
\t
I2
\t
S32
\t
S255
\t
s38
\t
I2
\n
"
"Class
\t
CLSID
\t
Context
\t
Component_
\n
"
"{110913E7-86D1-4BF3-9922-BA103FCDDDFA}
\t
LocalServer
\t
class
\t\t
description
\t
{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}
\t
mask1;mask2
\t\t\t
2
\t\t
class
\t\n
"
;
static
const
CHAR
rci_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
"
"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
"
"UnregisterClassInfo
\t\t
3000
\n
"
"RegisterClassInfo
\t\t
4000
\n
"
"RegisterProduct
\t\t
5000
\n
"
"PublishFeatures
\t\t
5100
\n
"
"PublishProduct
\t\t
5200
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -2614,6 +2663,20 @@ static const msi_table res_tables[] =
ADD_TABLE
(
property
)
};
static
const
msi_table
rci_tables
[]
=
{
ADD_TABLE
(
directory
),
ADD_TABLE
(
rci_component
),
ADD_TABLE
(
rci_feature
),
ADD_TABLE
(
rci_feature_comp
),
ADD_TABLE
(
rci_file
),
ADD_TABLE
(
rci_appid
),
ADD_TABLE
(
rci_class
),
ADD_TABLE
(
rci_install_exec_seq
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
)
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -8931,6 +8994,50 @@ static void test_remove_env_strings(void)
delete_test_files
();
}
static
void
test_register_class_info
(
void
)
{
UINT
r
;
LONG
res
;
HKEY
hkey
;
create_test_files
();
create_file
(
"msitest
\\
class.txt"
,
1000
);
create_database
(
msifile
,
rci_tables
,
sizeof
(
rci_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"CLSID
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"FileType
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"AppID
\\
{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}"
,
&
hkey
);
ok
(
res
==
ERROR_SUCCESS
,
"key not created
\n
"
);
RegCloseKey
(
hkey
);
r
=
MsiInstallProductA
(
msifile
,
"REMOVE=ALL"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"CLSID
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"FileType
\\
{110913E7-86D1-4BF3-9922-BA103FCDDDFA}"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
res
=
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
"AppID
\\
{CFCC3B38-E683-497D-9AB4-CB40AAFE307F}"
,
&
hkey
);
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"key not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
class.txt"
,
TRUE
),
"file not removed
\n
"
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"directory not removed
\n
"
);
delete_test_files
();
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -9038,6 +9145,7 @@ START_TEST(install)
test_find_related_products
();
test_remove_ini_values
();
test_remove_env_strings
();
test_register_class_info
();
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