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
566beb78
Commit
566beb78
authored
Jun 22, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Jun 23, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for components that aren't associated with a feature.
parent
881653cc
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
3 deletions
+51
-3
Makefile.in
dlls/msi/tests/Makefile.in
+1
-1
install.c
dlls/msi/tests/install.c
+50
-2
No files found.
dlls/msi/tests/Makefile.in
View file @
566beb78
...
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
msi.dll
IMPORTS
=
cabinet msi advapi32 kernel32
IMPORTS
=
cabinet msi
ole32
advapi32 kernel32
CTESTS
=
\
db.c
\
...
...
dlls/msi/tests/install.c
View file @
566beb78
...
...
@@ -70,7 +70,8 @@ static const CHAR component_dat[] = "Component\tComponentId\tDirectory_\tAttribu
"Four
\t
{FD37B4EA-7209-45C0-8917-535F35A2F080}
\t
CABOUTDIR
\t
2
\t\t
four.txt
\n
"
"One
\t
{783B242E-E185-4A56-AF86-C09815EC053C}
\t
MSITESTDIR
\t
2
\t\t
one.txt
\n
"
"Three
\t
{010B6ADD-B27D-4EDD-9B3D-34C4F7D61684}
\t
CHANGEDDIR
\t
2
\t\t
three.txt
\n
"
"Two
\t
{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}
\t
FIRSTDIR
\t
2
\t\t
two.txt"
;
"Two
\t
{BF03D1A6-20DA-4A65-82F3-6CAC995915CE}
\t
FIRSTDIR
\t
2
\t\t
two.txt
\n
"
"dangler
\t
{6091DF25-EF96-45F1-B8E9-A9B1420C7A3C}
\t
TARGETDIR
\t
4
\t\t
regdata"
;
static
const
CHAR
directory_dat
[]
=
"Directory
\t
Directory_Parent
\t
DefaultDir
\n
"
"s72
\t
S72
\t
l255
\n
"
...
...
@@ -151,7 +152,8 @@ static const CHAR registry_dat[] = "Registry\tRoot\tKey\tName\tValue\tComponent_
"s72
\t
i2
\t
l255
\t
L255
\t
L0
\t
s72
\n
"
"Registry
\t
Registry
\n
"
"Apples
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
Name
\t
imaname
\t
One
\n
"
"Oranges
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
number
\t
#314
\t
Two"
;
"Oranges
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
number
\t
#314
\t
Two
\n
"
"regdata
\t
2
\t
SOFTWARE
\\
Wine
\\
msitest
\t
blah
\t
bad
\t
dangler"
;
typedef
struct
_msi_table
{
...
...
@@ -623,6 +625,14 @@ static void test_MsiInstallProduct(void)
ok
(
!
lstrcmpA
(
path
,
"imaname"
),
"Expected imaname, got %s
\n
"
,
path
);
}
size
=
MAX_PATH
;
type
=
REG_SZ
;
res
=
RegQueryValueExA
(
hkey
,
"blah"
,
NULL
,
&
type
,
(
LPBYTE
)
path
,
&
size
);
todo_wine
{
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_FILE_NOT_FOUND, got %ld
\n
"
,
res
);
}
size
=
sizeof
(
num
);
type
=
REG_DWORD
;
res
=
RegQueryValueExA
(
hkey
,
"number"
,
NULL
,
&
type
,
(
LPBYTE
)
&
num
,
&
size
);
...
...
@@ -635,6 +645,43 @@ static void test_MsiInstallProduct(void)
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Wine
\\
msitest"
);
}
static
void
test_MsiSetComponentState
(
void
)
{
MSIHANDLE
package
;
char
path
[
MAX_PATH
];
UINT
r
;
CoInitialize
(
NULL
);
lstrcpy
(
path
,
CURR_DIR
);
lstrcat
(
path
,
"
\\
"
);
lstrcat
(
path
,
msifile
);
r
=
MsiOpenPackage
(
path
,
&
package
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiDoAction
(
package
,
"CostInitialize"
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
}
r
=
MsiDoAction
(
package
,
"FileCost"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiDoAction
(
package
,
"CostFinalize"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
r
=
MsiSetComponentState
(
package
,
"dangler"
,
INSTALLSTATE_SOURCE
);
todo_wine
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %u
\n
"
,
r
);
}
MsiCloseHandle
(
package
);
CoUninitialize
();
}
START_TEST
(
install
)
{
if
(
!
init_function_pointers
())
...
...
@@ -644,6 +691,7 @@ START_TEST(install)
create_database
(
msifile
,
tables
,
sizeof
(
tables
)
/
sizeof
(
msi_table
));
test_MsiInstallProduct
();
test_MsiSetComponentState
();
delete_test_files
();
}
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