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
0023759a
Commit
0023759a
authored
Nov 15, 2007
by
James Hawkins
Committed by
Alexandre Julliard
Nov 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for situations involving missing cabinets.
parent
bb747e4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
0 deletions
+94
-0
install.c
dlls/msi/tests/install.c
+94
-0
No files found.
dlls/msi/tests/install.c
View file @
0023759a
...
...
@@ -530,6 +530,35 @@ static const CHAR mov_move_file_dat[] = "FileKey\tComponent_\tSourceName\tDestNa
"wildcardnodest
\t
augustus
\t
budd*
\t\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
"singlenodest
\t
augustus
\t
b?r
\t\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
;
static
const
CHAR
mc_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
"
"maximus
\t\t
MSITESTDIR
\t
0
\t
1
\t
maximus
\n
"
"augustus
\t\t
MSITESTDIR
\t
0
\t
1
\t
augustus
\n
"
"caesar
\t\t
MSITESTDIR
\t
0
\t
1
\t
caesar
\n
"
"gaius
\t\t
MSITESTDIR
\t
0
\t
GAIUS=1
\t
gaius
\n
"
;
static
const
CHAR
mc_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
500
\t\t\t
0
\t
2
\n
"
"caesar
\t
caesar
\t
caesar
\t
500
\t\t\t
16384
\t
3
\n
"
"gaius
\t
gaius
\t
gaius
\t
500
\t\t\t
16384
\t
4"
;
static
const
CHAR
mc_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
1
\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
"
"4
\t
4
\t\t
test3.cab
\t
DISK3
\t\n
"
;
static
const
CHAR
mc_file_hash_dat
[]
=
"File_
\t
Options
\t
HashPart1
\t
HashPart2
\t
HashPart3
\t
HashPart4
\n
"
"s72
\t
i2
\t
i4
\t
i4
\t
i4
\t
i4
\n
"
"MsiFileHash
\t
File_
\n
"
"caesar
\t
0
\t
1477005400
\t
-2141257985
\t
284379198
\t
21485139"
;
typedef
struct
_msi_table
{
const
CHAR
*
filename
;
...
...
@@ -793,6 +822,19 @@ static const msi_table mov_tables[] =
ADD_TABLE
(
registry
),
};
static
const
msi_table
mc_tables
[]
=
{
ADD_TABLE
(
mc_component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
cc_feature
),
ADD_TABLE
(
cie_feature_comp
),
ADD_TABLE
(
mc_file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
mc_media
),
ADD_TABLE
(
property
),
ADD_TABLE
(
mc_file_hash
),
};
/* cabinet definitions */
/* make the max size large so there is only one cab file */
...
...
@@ -3472,6 +3514,57 @@ static void test_movefiles(void)
RemoveDirectory
(
"msitest"
);
DeleteFile
(
msifile
);
}
static
void
test_missingcab
(
void
)
{
UINT
r
;
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
augustus"
,
500
);
create_file
(
"maximus"
,
500
);
create_database
(
msifile
,
mc_tables
,
sizeof
(
mc_tables
)
/
sizeof
(
msi_table
));
MsiSetInternalUI
(
INSTALLUILEVEL_NONE
,
NULL
);
create_cab_file
(
"test1.cab"
,
MEDIA_SIZE
,
"maximus
\0
"
);
create_pf
(
"msitest"
,
FALSE
);
create_pf
(
"msitest
\\
caesar"
,
TRUE
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File not installed
\n
"
);
}
ok
(
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File not installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File not installed
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
gaius"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
create_pf
(
"msitest"
,
FALSE
);
create_pf
(
"msitest
\\
caesar"
,
TRUE
);
create_pf
(
"msitest
\\
gaius"
,
TRUE
);
r
=
MsiInstallProductA
(
msifile
,
"GAIUS=1"
);
todo_wine
{
ok
(
r
==
ERROR_INSTALL_FAILURE
,
"Expected ERROR_INSTALL_FAILURE, got %u
\n
"
,
r
);
ok
(
!
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"File installed
\n
"
);
}
ok
(
!
delete_pf
(
"msitest
\\
augustus"
,
TRUE
),
"File installed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
caesar"
,
TRUE
),
"File removed
\n
"
);
ok
(
delete_pf
(
"msitest
\\
gaius"
,
TRUE
),
"File removed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"File not installed
\n
"
);
DeleteFile
(
"msitest
\\
augustus"
);
RemoveDirectory
(
"msitest"
);
DeleteFile
(
"maximus"
);
DeleteFile
(
"test1.cab"
);
DeleteFile
(
msifile
);
}
START_TEST
(
install
)
{
DWORD
len
;
...
...
@@ -3512,6 +3605,7 @@ START_TEST(install)
test_adminprops
();
test_removefiles
();
test_movefiles
();
test_missingcab
();
SetCurrentDirectoryA
(
prev_path
);
}
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