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
8386157c
Commit
8386157c
authored
Oct 10, 2018
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Add tests for directory properties.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
de78ca24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
100 additions
and
8 deletions
+100
-8
msi.c
dlls/msi/tests/msi.c
+100
-8
No files found.
dlls/msi/tests/msi.c
View file @
8386157c
...
...
@@ -348,12 +348,11 @@ static const char spf_install_exec_seq_dat[] =
"SetFolderProp
\t\t
950
\n
"
"SetFolderProp2
\t\t
960
\n
"
"CostFinalize
\t\t
1000
\n
"
"InstallValidate
\t\t
1400
\n
"
"InstallInitialize
\t\t
1500
\n
"
"InstallFiles
\t\t
4000
\n
"
"InstallServices
\t\t
5000
\n
"
"InstallFinalize
\t\t
6600
\n
"
"InstallInitialize
\t\t
1500
\n
"
"InstallValidate
\t\t
1400
\n
"
"LaunchConditions
\t\t
100"
;
"InstallFinalize
\t\t
6600
\n
"
;
static
const
char
spf_install_ui_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
...
...
@@ -364,6 +363,68 @@ static const char spf_install_ui_seq_dat[] =
"CostFinalize
\t\t
1000
\n
"
"ExecuteAction
\t\t
1100
\n
"
;
static
const
char
spf_directory_dat
[]
=
"Directory
\t
Directory_Parent
\t
DefaultDir
\n
"
"s72
\t
S72
\t
l255
\n
"
"Directory
\t
Directory
\n
"
"PARENTDIR
\t
TARGETDIR
\t
parent
\n
"
"CHILDDIR
\t
PARENTDIR
\t
child
\n
"
"MSITESTDIR
\t
ProgramFilesFolder
\t
msitest
\n
"
"ProgramFilesFolder
\t
TARGETDIR
\t
.
\n
"
"TARGETDIR
\t\t
SourceDir"
;
static
const
char
spf_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
{DF2CBABC-3BCC-47E5-A998-448D1C0C895B}
\t
MSITESTDIR
\t
0
\t
UILevel=5
\t
maximus
\n
"
;
static
const
char
spf2_install_exec_seq_dat
[]
=
"Action
\t
Condition
\t
Sequence
\n
"
"s72
\t
S255
\t
I2
\n
"
"InstallExecuteSequence
\t
Action
\n
"
"CostInitialize
\t\t
800
\n
"
"FileCost
\t\t
900
\n
"
"FormatParentFolderCheck
\t\t
910
\n
"
"FormatChildFolderCheck
\t\t
920
\n
"
"CheckParentFolder
\t
NOT PARENTDIR=PARENTDIRCHECK
\t
930
\n
"
"CheckChildFolder
\t
NOT CHILDDIR=CHILDDIRCHECK
\t
940
\n
"
"FormatParentFolderCheck2
\t\t
945
\n
"
"SetParentFolder
\t\t
950
\n
"
"CheckParentFolder2
\t
NOT PARENTDIR=PARENTDIRCHECK
\t
960
\n
"
"CheckChildFolder2
\t
NOT CHILDDIR=CHILDDIRCHECK
\t
970
\n
"
"CostFinalize
\t\t
1000
\n
"
"FormatParentFolderCheck3
\t\t
1005
\n
"
"CheckParentFolder3
\t
NOT PARENTDIR=PARENTDIRCHECK
\t
1010
\n
"
"CheckChildFolder3
\t
NOT CHILDDIR=CHILDDIRCHECK
\t
1020
\n
"
"InstallValidate
\t\t
1400
\n
"
"InstallInitialize
\t\t
1500
\n
"
"InstallFiles
\t\t
4000
\n
"
"CreateShortcuts
\t\t
4100
\n
"
"InstallFinalize
\t\t
6600
\n
"
;
static
const
char
spf2_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
"
"FormatParentFolderCheck
\t
51
\t
PARENTDIRCHECK
\t
[TARGETDIR]parent
\\\t\n
"
"FormatChildFolderCheck
\t
51
\t
CHILDDIRCHECK
\t
[TARGETDIR]parent
\\
child
\\\t\n
"
"CheckParentFolder
\t
19
\t
PARENTDIR
\t
parent prop wrong before set: [PARENTDIR]
\t\n
"
"CheckChildFolder
\t
19
\t
CHILDDIR
\t
child prop wrong before set: [CHILDDIR]
\t\n
"
"FormatParentFolderCheck2
\t
51
\t
PARENTDIRCHECK
\t
[ProgramFilesFolder]msitest
\\
parent
\t\n
"
"SetParentFolder
\t
51
\t
PARENTDIR
\t
[PARENTDIRCHECK]
\t\n
"
"CheckParentFolder2
\t
19
\t
PARENTDIR
\t
parent prop wrong after set: [PARENTDIR]
\t\n
"
"CheckChildFolder2
\t
19
\t
CHILDDIR
\t
child prop wrong after set: [CHILDDIR]
\t\n
"
"FormatParentFolderCheck3
\t
51
\t
PARENTDIRCHECK
\t
[ProgramFilesFolder]msitest
\\
parent
\\\t\n
"
"CheckParentFolder3
\t
19
\t
PARENTDIR
\t
parent prop wrong after CostFinalize: [PARENTDIR]
\t\n
"
"CheckChildFolder3
\t
19
\t
CHILDDIR
\t
child prop wrong after CostFinalize: [CHILDDIR]
\t\n
"
;
static
const
char
shortcut_dat
[]
=
"Shortcut
\t
Directory_
\t
Name
\t
Component_
\t
Target
\t
Arguments
\t
Description
\t
Hotkey
\t
Icon_
\t
IconIndex
\t
ShowCmd
\t
WkDir
\n
"
"s72
\t
s72
\t
l128
\t
s72
\t
s72
\t
S255
\t
L255
\t
I2
\t
S72
\t
I2
\t
I2
\t
S72
\n
"
"Shortcut
\t
Shortcut
\n
"
"Shortcut
\t
CHILDDIR
\t
Shortcut
\t
maximus
\t
[#maximus]
\t\t
Shortcut
\t\t\t\t\t
MSITESTDIR
\n
"
;
static
const
char
sd_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
"
...
...
@@ -649,6 +710,21 @@ static const msi_table spf_tables[] =
ADD_TABLE
(
spf_install_ui_seq
)
};
static
const
msi_table
spf2_tables
[]
=
{
ADD_TABLE
(
spf_component
),
ADD_TABLE
(
spf_directory
),
ADD_TABLE
(
lus_feature
),
ADD_TABLE
(
lus_feature_comp
),
ADD_TABLE
(
lus_file
),
ADD_TABLE
(
lus0_media
),
ADD_TABLE
(
property
),
ADD_TABLE
(
spf2_custom_action
),
ADD_TABLE
(
spf2_install_exec_seq
),
ADD_TABLE
(
spf_install_ui_seq
),
ADD_TABLE
(
shortcut
)
};
static
const
msi_table
sd_tables
[]
=
{
ADD_TABLE
(
directory
),
...
...
@@ -14096,7 +14172,6 @@ error:
static
void
test_setpropertyfolder
(
void
)
{
UINT
r
;
CHAR
path
[
MAX_PATH
];
if
(
is_process_limited
())
{
...
...
@@ -14104,9 +14179,6 @@ static void test_setpropertyfolder(void)
return
;
}
lstrcpyA
(
path
,
PROG_FILES_DIR
);
lstrcatA
(
path
,
"
\\
msitest
\\
added"
);
CreateDirectoryA
(
"msitest"
,
NULL
);
create_file
(
"msitest
\\
maximus"
,
500
);
...
...
@@ -14126,6 +14198,26 @@ static void test_setpropertyfolder(void)
ok
(
delete_pf
(
"msitest
\\
added"
,
FALSE
),
"Directory not created
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"Directory not created
\n
"
);
CreateDirectoryA
(
"parent"
,
NULL
);
CreateDirectoryA
(
"parent
\\
child"
,
NULL
);
create_file
(
"parent
\\
child
\\
maximus"
,
500
);
create_database
(
msifile
,
spf2_tables
,
ARRAY_SIZE
(
spf2_tables
));
r
=
MsiInstallProductA
(
msifile
,
"TARGETDIR=c:
\\
"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
ok
(
delete_pf
(
"msitest
\\
maximus"
,
TRUE
),
"file not installed
\n
"
);
ok
(
delete_pf
(
"msitest"
,
FALSE
),
"directory not created
\n
"
);
ok
(
DeleteFileA
(
"c:
\\
parent
\\
child
\\
Shortcut.lnk"
),
"file not installed"
);
ok
(
RemoveDirectoryA
(
"c:
\\
parent
\\
child"
),
"directory not created
\n
"
);
ok
(
RemoveDirectoryA
(
"c:
\\
parent"
),
"directory not created
\n
"
);
DeleteFileA
(
"parent
\\
child
\\
maximus"
);
RemoveDirectoryA
(
"parent
\\
child"
);
RemoveDirectoryA
(
"parent"
);
error:
DeleteFileA
(
msifile
);
DeleteFileA
(
"msitest
\\
maximus"
);
...
...
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