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
92cd7a8f
Commit
92cd7a8f
authored
Sep 09, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a test to show that creating shortcuts works regardless of COM initialization state.
parent
6b107c7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
install.c
dlls/msi/tests/install.c
+63
-0
No files found.
dlls/msi/tests/install.c
View file @
92cd7a8f
...
@@ -124,6 +124,7 @@ static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
...
@@ -124,6 +124,7 @@ static const CHAR install_exec_seq_dat[] = "Action\tCondition\tSequence\n"
"MoveFiles
\t\t
1700
\n
"
"MoveFiles
\t\t
1700
\n
"
"InstallFiles
\t\t
4000
\n
"
"InstallFiles
\t\t
4000
\n
"
"DuplicateFiles
\t\t
4500
\n
"
"DuplicateFiles
\t\t
4500
\n
"
"CreateShortcuts
\t\t
4600
\n
"
"InstallServices
\t\t
5000
\n
"
"InstallServices
\t\t
5000
\n
"
"InstallFinalize
\t\t
6600
\n
"
"InstallFinalize
\t\t
6600
\n
"
"InstallInitialize
\t\t
1500
\n
"
"InstallInitialize
\t\t
1500
\n
"
...
@@ -159,6 +160,11 @@ static const CHAR property_dat[] = "Property\tValue\n"
...
@@ -159,6 +160,11 @@ static const CHAR property_dat[] = "Property\tValue\n"
"SERVNAME
\t
TestService
\n
"
"SERVNAME
\t
TestService
\n
"
"SERVDISP
\t
TestServiceDisp
\n
"
;
"SERVDISP
\t
TestServiceDisp
\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
MSITESTDIR
\t
Shortcut
\t
component
\t
Shortcut
\t\t
Shortcut
\t\t\t\t\t\n
"
;
static
const
CHAR
up_property_dat
[]
=
"Property
\t
Value
\n
"
static
const
CHAR
up_property_dat
[]
=
"Property
\t
Value
\n
"
"s72
\t
l0
\n
"
"s72
\t
l0
\n
"
"Property
\t
Property
\n
"
"Property
\t
Property
\n
"
...
@@ -885,6 +891,19 @@ static const msi_table tables[] =
...
@@ -885,6 +891,19 @@ static const msi_table tables[] =
ADD_TABLE
(
service_control
)
ADD_TABLE
(
service_control
)
};
};
static
const
msi_table
sc_tables
[]
=
{
ADD_TABLE
(
component
),
ADD_TABLE
(
directory
),
ADD_TABLE
(
feature
),
ADD_TABLE
(
feature_comp
),
ADD_TABLE
(
file
),
ADD_TABLE
(
install_exec_seq
),
ADD_TABLE
(
media
),
ADD_TABLE
(
property
),
ADD_TABLE
(
shortcut
)
};
static
const
msi_table
up_tables
[]
=
static
const
msi_table
up_tables
[]
=
{
{
ADD_TABLE
(
component
),
ADD_TABLE
(
component
),
...
@@ -6181,6 +6200,49 @@ static void test_int_widths( void )
...
@@ -6181,6 +6200,49 @@ static void test_int_widths( void )
RemoveDirectoryA
(
tmpdir
);
RemoveDirectoryA
(
tmpdir
);
}
}
static
void
test_shortcut
(
void
)
{
UINT
r
;
HRESULT
hr
;
create_test_files
();
create_database
(
msifile
,
sc_tables
,
sizeof
(
sc_tables
)
/
sizeof
(
msi_table
));
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
hr
=
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
ok
(
SUCCEEDED
(
hr
),
"CoInitialize failed 0x%08x
\n
"
,
hr
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
todo_wine
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
CoUninitialize
();
hr
=
CoInitializeEx
(
NULL
,
COINIT_APARTMENTTHREADED
);
ok
(
SUCCEEDED
(
hr
),
"CoInitialize failed 0x%08x
\n
"
,
hr
);
r
=
MsiInstallProductA
(
msifile
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
CoUninitialize
();
delete_pf
(
"msitest
\\
cabout
\\
new
\\
five.txt"
,
TRUE
);
delete_pf
(
"msitest
\\
cabout
\\
new"
,
FALSE
);
delete_pf
(
"msitest
\\
cabout
\\
four.txt"
,
TRUE
);
delete_pf
(
"msitest
\\
cabout"
,
FALSE
);
delete_pf
(
"msitest
\\
changed
\\
three.txt"
,
TRUE
);
delete_pf
(
"msitest
\\
changed"
,
FALSE
);
delete_pf
(
"msitest
\\
first
\\
two.txt"
,
TRUE
);
delete_pf
(
"msitest
\\
first"
,
FALSE
);
delete_pf
(
"msitest
\\
filename"
,
TRUE
);
delete_pf
(
"msitest
\\
one.txt"
,
TRUE
);
delete_pf
(
"msitest
\\
service.exe"
,
TRUE
);
delete_pf
(
"msitest
\\
Shortcut.lnk"
,
TRUE
);
delete_pf
(
"msitest"
,
FALSE
);
delete_test_files
();
}
START_TEST
(
install
)
START_TEST
(
install
)
{
{
DWORD
len
;
DWORD
len
;
...
@@ -6262,6 +6324,7 @@ START_TEST(install)
...
@@ -6262,6 +6324,7 @@ START_TEST(install)
test_adminimage
();
test_adminimage
();
test_propcase
();
test_propcase
();
test_int_widths
();
test_int_widths
();
test_shortcut
();
DeleteFileA
(
log_file
);
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