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
84f34ec2
Commit
84f34ec2
authored
Nov 07, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Nov 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add more tests for installing from cabinets.
parent
5cff5038
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
102 additions
and
4 deletions
+102
-4
install.c
dlls/msi/tests/install.c
+102
-4
No files found.
dlls/msi/tests/install.c
View file @
84f34ec2
...
...
@@ -152,7 +152,8 @@ static const CHAR cc_component_dat[] = "Component\tComponentId\tDirectory_\tAttr
"s72
\t
S38
\t
s72
\t
i2
\t
S255
\t
S72
\n
"
"Component
\t
Component
\n
"
"maximus
\t\t
MSITESTDIR
\t
0
\t
1
\t
maximus
\n
"
"augustus
\t\t
MSITESTDIR
\t
0
\t
1
\t
augustus"
;
"augustus
\t\t
MSITESTDIR
\t
0
\t
1
\t
augustus
\n
"
"caesar
\t\t
MSITESTDIR
\t
0
\t
1
\t
caesar
\n
"
;
static
const
CHAR
cc_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
"
...
...
@@ -163,19 +164,43 @@ static const CHAR cc_feature_comp_dat[] = "Feature_\tComponent_\n"
"s38
\t
s72
\n
"
"FeatureComponents
\t
Feature_
\t
Component_
\n
"
"feature
\t
maximus
\n
"
"feature
\t
augustus"
;
"feature
\t
augustus
\n
"
"feature
\t
caesar"
;
static
const
CHAR
cc_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
"
"maximus
\t
maximus
\t
maximus
\t
500
\t\t\t
16384
\t
1
\n
"
"augustus
\t
augustus
\t
augustus
\t
50000
\t\t\t
16384
\t
1"
;
"augustus
\t
augustus
\t
augustus
\t
50000
\t\t\t
16384
\t
2
\n
"
"caesar
\t
caesar
\t
caesar
\t
500
\t\t\t
16384
\t
12"
;
static
const
CHAR
cc_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
10
\t\t
test1.cab
\t
DISK1
\t\n
"
"2
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
;
"2
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
"3
\t
12
\t\t
test3.cab
\t
DISK3
\t\n
"
;
static
const
CHAR
co_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
"
"maximus
\t
maximus
\t
maximus
\t
500
\t\t\t
16384
\t
1
\n
"
"augustus
\t
augustus
\t
augustus
\t
50000
\t\t\t
16384
\t
2
\n
"
"caesar
\t
caesar
\t
caesar
\t
500
\t\t\t
16384
\t
3"
;
static
const
CHAR
co_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
10
\t\t
test1.cab
\t
DISK1
\t\n
"
"2
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
"3
\t
3
\t\t
test3.cab
\t
DISK3
\t\n
"
;
static
const
CHAR
co2_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
10
\t\t
test1.cab
\t
DISK1
\t\n
"
"2
\t
12
\t\t
test3.cab
\t
DISK3
\t\n
"
"3
\t
2
\t\t
test2.cab
\t
DISK2
\t\n
"
;
typedef
struct
_msi_table
{
...
...
@@ -213,6 +238,30 @@ static const msi_table cc_tables[] =
ADD_TABLE
(
property
),
};
static
const
msi_table
co_tables
[]
=
{
ADD_TABLE
(
cc_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
cc_feature
),
ADD_TABLE
(
cc_feature_comp
),
ADD_TABLE
(
co_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
co_media
),
ADD_TABLE
(
property
),
};
static
const
msi_table
co2_tables
[]
=
{
ADD_TABLE
(
cc_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
cc_feature
),
ADD_TABLE
(
cc_feature_comp
),
ADD_TABLE
(
cc_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
co2_media
),
ADD_TABLE
(
property
),
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -766,6 +815,7 @@ static void create_cc_test_files(void)
create_file
(
"maximus"
,
500
);
create_file
(
"augustus"
,
50000
);
create_file
(
"caesar"
,
500
);
set_cab_parameters
(
&
cabParams
,
"test1.cab"
,
200
);
...
...
@@ -792,8 +842,11 @@ static void create_cc_test_files(void)
res
=
FCIDestroy
(
hfci
);
ok
(
res
,
"Failed to destroy the cabinet
\n
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
DeleteFile
(
"maximus"
);
DeleteFile
(
"augustus"
);
DeleteFile
(
"caesar"
);
}
static
void
test_continuouscabs
(
void
)
...
...
@@ -815,11 +868,13 @@ static void test_continuouscabs(void)
{
ok
(
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File not installed
\n
"
);
}
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
DeleteFile
(
"test1.cab"
);
DeleteFile
(
"test2.cab"
);
DeleteFile
(
"test3.cab"
);
DeleteFile
(
msifile
);
}
...
...
@@ -830,6 +885,7 @@ static void test_caborder(void)
create_file
(
"imperator"
,
100
);
create_file
(
"maximus"
,
500
);
create_file
(
"augustus"
,
50000
);
create_file
(
"caesar"
,
500
);
create_database
(
msifile
,
cc_tables
,
sizeof
(
cc_tables
)
/
sizeof
(
msi_table
));
...
...
@@ -837,10 +893,12 @@ static void test_caborder(void)
create_cab_file
(
"test1.cab"
,
MEDIA_SIZE
,
"maximus
\0
"
);
create_cab_file
(
"test2.cab"
,
MEDIA_SIZE
,
"augustus
\0
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File is installed
\n
"
);
todo_wine
{
ok
(
!
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File is installed
\n
"
);
...
...
@@ -849,25 +907,65 @@ static void test_caborder(void)
DeleteFile
(
"test1.cab"
);
DeleteFile
(
"test2.cab"
);
DeleteFile
(
"test3.cab"
);
create_cab_file
(
"test1.cab"
,
MEDIA_SIZE
,
"imperator
\0
"
);
create_cab_file
(
"test2.cab"
,
MEDIA_SIZE
,
"maximus
\0
augustus
\0
"
);
create_cab_file
(
"test3.cab"
,
MEDIA_SIZE
,
"caesar
\0
"
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File is installed
\n
"
);
todo_wine
{
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File is installed
\n
"
);
}
DeleteFile
(
"test1.cab"
);
DeleteFile
(
"test2.cab"
);
DeleteFile
(
"test3.cab"
);
DeleteFile
(
msifile
);
create_cc_test_files
();
create_database
(
msifile
,
co_tables
,
sizeof
(
co_tables
)
/
sizeof
(
msi_table
));
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File is installed
\n
"
);
todo_wine
{
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File is installed
\n
"
);
}
DeleteFile
(
"test1.cab"
);
DeleteFile
(
"test2.cab"
);
DeleteFile
(
"test3.cab"
);
DeleteFile
(
msifile
);
create_cc_test_files
();
create_database
(
msifile
,
co2_tables
,
sizeof
(
co2_tables
)
/
sizeof
(
msi_table
));
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File is installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File is installed
\n
"
);
todo_wine
{
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest"
,
FALSE
),
"File is installed
\n
"
);
}
DeleteFile
(
"test1.cab"
);
DeleteFile
(
"test2.cab"
);
DeleteFile
(
"test3.cab"
);
DeleteFile
(
"imperator"
);
DeleteFile
(
"maximus"
);
DeleteFile
(
"augustus"
);
DeleteFile
(
"caesar"
);
DeleteFile
(
msifile
);
}
...
...
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