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
bbfaf6af
Commit
bbfaf6af
authored
Feb 11, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 11, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for installing and removing ODBC drivers.
parent
28bf8e1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
103 additions
and
0 deletions
+103
-0
install.c
dlls/msi/tests/install.c
+103
-0
No files found.
dlls/msi/tests/install.c
View file @
bbfaf6af
...
...
@@ -1260,6 +1260,66 @@ static const CHAR vp_install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"InstallFiles
\t\t
4000
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
CHAR
odbc_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
"
"ODBCdriver.dll
\t
odbc
\t
ODBCdriver.dll
\t
1000
\t\t\t
8192
\t
1
\n
"
"ODBCdriver2.dll
\t
odbc
\t
ODBCdriver2.dll
\t
1000
\t\t\t
8192
\t
2
\n
"
"ODBCtranslator.dll
\t
odbc
\t
ODBCtranslator.dll
\t
1000
\t\t\t
8192
\t
3
\n
"
"ODBCtranslator2.dll
\t
odbc
\t
ODBCtranslator2.dll
\t
1000
\t\t\t
8192
\t
4
\n
"
"ODBCsetup.dll
\t
odbc
\t
ODBCsetup.dll
\t
1000
\t\t\t
8192
\t
5
\n
"
;
static
const
CHAR
odbc_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
"
"odbc
\t\t\t
odbc feature
\t
1
\t
2
\t
MSITESTDIR
\t
0
\n
"
;
static
const
CHAR
odbc_feature_comp_dat
[]
=
"Feature_
\t
Component_
\n
"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"odbc
\t
odbc
\n
"
;
static
const
CHAR
odbc_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
"
"odbc
\t
{B6F3E4AE-35D1-4B72-9044-989F03E20A43}
\t
MSITESTDIR
\t
0
\t\t
ODBCdriver.dll
\n
"
;
static
const
CHAR
odbc_driver_dat
[]
=
"Driver
\t
Component_
\t
Description
\t
File_
\t
File_Setup
\n
"
"s72
\t
s72
\t
s255
\t
s72
\t
S72
\n
"
"ODBCDriver
\t
Driver
\n
"
"ODBC test driver
\t
odbc
\t
ODBC test driver
\t
ODBCdriver.dll
\t\n
"
"ODBC test driver2
\t
odbc
\t
ODBC test driver2
\t
ODBCdriver2.dll
\t
ODBCsetup.dll
\n
"
;
static
const
CHAR
odbc_translator_dat
[]
=
"Translator
\t
Component_
\t
Description
\t
File_
\t
File_Setup
\n
"
"s72
\t
s72
\t
s255
\t
s72
\t
S72
\n
"
"ODBCTranslator
\t
Translator
\n
"
"ODBC test translator
\t
odbc
\t
ODBC test translator
\t
ODBCtranslator.dll
\t\n
"
"ODBC test translator2
\t
odbc
\t
ODBC test translator2
\t
ODBCtranslator2.dll
\t
ODBCsetup.dll
\n
"
;
static
const
CHAR
odbc_datasource_dat
[]
=
"DataSource
\t
Component_
\t
Description
\t
DriverDescription
\t
Registration
\n
"
"s72
\t
s72
\t
s255
\t
s255
\t
i2
\n
"
"ODBCDataSource
\t
DataSource
\n
"
"ODBC data source
\t
odbc
\t
ODBC data source
\t
ODBC driver
\t
0
\n
"
;
static
const
CHAR
odbc_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
"
"InstallODBC
\t\t
3000
\n
"
"RemoveODBC
\t\t
3100
\n
"
"InstallFiles
\t\t
4000
\n
"
"InstallFinalize
\t\t
6000
\n
"
;
static
const
CHAR
odbc_media_dat
[]
=
"DiskId
\t
LastSequence
\t
DiskPrompt
\t
Cabinet
\t
VolumeLabel
\t
Source
\n
"
"i2
\t
i4
\t
L64
\t
S255
\t
S32
\t
S72
\n
"
"Media
\t
DiskId
\n
"
"1
\t
5
\t\t\t
DISK1
\t\n
"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -2056,6 +2116,21 @@ static const msi_table vp_tables[] =
ADD_TABLE
(
vp_property
)
};
static
const
msi_table
odbc_tables
[]
=
{
ADD_TABLE
(
odbc_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
odbc_feature
),
ADD_TABLE
(
odbc_feature_comp
),
ADD_TABLE
(
odbc_file
),
ADD_TABLE
(
odbc_driver
),
ADD_TABLE
(
odbc_translator
),
ADD_TABLE
(
odbc_datasource
),
ADD_TABLE
(
odbc_install_exec_seq
),
ADD_TABLE
(
odbc_media
),
ADD_TABLE
(
property
)
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -7920,6 +7995,33 @@ static void test_validate_product_id(void)
delete_test_files
();
}
static
void
test_install_remove_odbc
(
void
)
{
UINT
r
;
create_test_files
();
create_file
(
"msitest
\\
ODBCdriver.dll"
,
1000
);
create_file
(
"msitest
\\
ODBCdriver2.dll"
,
1000
);
create_file
(
"msitest
\\
ODBCtranslator.dll"
,
1000
);
create_file
(
"msitest
\\
ODBCtranslator2.dll"
,
1000
);
create_file
(
"msitest
\\
ODBCsetup.dll"
,
1000
);
create_database
(
msifile
,
odbc_tables
,
sizeof
(
odbc_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
ODBCdriver.dll"
,
TRUE
),
"file not created
\n
"
);
ok
(
delete_pf
(
"msitest
\\
ODBCdriver2.dll"
,
TRUE
),
"file not created
\n
"
);
ok
(
delete_pf
(
"msitest
\\
ODBCtranslator.dll"
,
TRUE
),
"file not created
\n
"
);
ok
(
delete_pf
(
"msitest
\\
ODBCtranslator2.dll"
,
TRUE
),
"file not created
\n
"
);
ok
(
delete_pf
(
"msitest
\\
ODBCsetup.dll"
,
TRUE
),
"file not created
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"directory not created
\n
"
);
delete_test_files
();
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -8018,6 +8120,7 @@ START_TEST(install)
test_self_registration
();
test_register_font
();
test_validate_product_id
();
test_install_remove_odbc
();
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