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
3272fef9
Commit
3272fef9
authored
Jan 24, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Jan 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Only use functions if they are implemented.
parent
c2a7914d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
15 deletions
+38
-15
msi.c
dlls/msi/tests/msi.c
+38
-15
No files found.
dlls/msi/tests/msi.c
View file @
3272fef9
...
@@ -48,14 +48,21 @@ static void init_functionpointers(void)
...
@@ -48,14 +48,21 @@ static void init_functionpointers(void)
HMODULE
hmsi
=
GetModuleHandleA
(
"msi.dll"
);
HMODULE
hmsi
=
GetModuleHandleA
(
"msi.dll"
);
HMODULE
hadvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
HMODULE
hadvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
pMsiGetComponentPathA
=
(
void
*
)
GetProcAddress
(
hmsi
,
"MsiGetComponentPathA"
);
#define GET_PROC(dll, func) \
pMsiGetFileHashA
=
(
void
*
)
GetProcAddress
(
hmsi
,
"MsiGetFileHashA"
);
p ## func = (void *)GetProcAddress(dll, #func); \
pMsiOpenPackageExA
=
(
void
*
)
GetProcAddress
(
hmsi
,
"MsiOpenPackageExA"
);
if(!p ## func) \
pMsiOpenPackageExW
=
(
void
*
)
GetProcAddress
(
hmsi
,
"MsiOpenPackageExW"
);
trace("GetProcAddress(%s) failed\n", #func);
pMsiQueryComponentStateA
=
(
void
*
)
GetProcAddress
(
hmsi
,
"MsiQueryComponentStateA"
);
pMsiUseFeatureExA
=
(
void
*
)
GetProcAddress
(
hmsi
,
"MsiUseFeatureExA"
);
GET_PROC
(
hmsi
,
MsiGetComponentPathA
)
GET_PROC
(
hmsi
,
MsiGetFileHashA
)
pConvertSidToStringSidA
=
(
void
*
)
GetProcAddress
(
hadvapi32
,
"ConvertSidToStringSidA"
);
GET_PROC
(
hmsi
,
MsiOpenPackageExA
)
GET_PROC
(
hmsi
,
MsiOpenPackageExW
)
GET_PROC
(
hmsi
,
MsiQueryComponentStateA
)
GET_PROC
(
hmsi
,
MsiUseFeatureExA
)
GET_PROC
(
hadvapi32
,
ConvertSidToStringSidA
)
#undef GET_PROC
}
}
static
void
test_usefeature
(
void
)
static
void
test_usefeature
(
void
)
...
@@ -63,7 +70,10 @@ static void test_usefeature(void)
...
@@ -63,7 +70,10 @@ static void test_usefeature(void)
INSTALLSTATE
r
;
INSTALLSTATE
r
;
if
(
!
pMsiUseFeatureExA
)
if
(
!
pMsiUseFeatureExA
)
{
skip
(
"MsiUseFeatureExA not implemented
\n
"
);
return
;
return
;
}
r
=
MsiQueryFeatureState
(
NULL
,
NULL
);
r
=
MsiQueryFeatureState
(
NULL
,
NULL
);
ok
(
r
==
INSTALLSTATE_INVALIDARG
,
"wrong return val
\n
"
);
ok
(
r
==
INSTALLSTATE_INVALIDARG
,
"wrong return val
\n
"
);
...
@@ -279,7 +289,7 @@ static void test_MsiGetFileHash(void)
...
@@ -279,7 +289,7 @@ static void test_MsiGetFileHash(void)
if
(
!
pMsiGetFileHashA
)
if
(
!
pMsiGetFileHashA
)
{
{
skip
(
"MsiGetFileHash not implemented
.
"
);
skip
(
"MsiGetFileHash not implemented
\n
"
);
return
;
return
;
}
}
...
@@ -724,6 +734,12 @@ static void test_MsiQueryComponentState(void)
...
@@ -724,6 +734,12 @@ static void test_MsiQueryComponentState(void)
static
const
INSTALLSTATE
MAGIC_ERROR
=
0xdeadbeef
;
static
const
INSTALLSTATE
MAGIC_ERROR
=
0xdeadbeef
;
if
(
!
pMsiQueryComponentStateA
)
{
skip
(
"MsiQueryComponentStateA not implemented
\n
"
);
return
;
}
create_test_guid
(
prodcode
,
prod_squashed
);
create_test_guid
(
prodcode
,
prod_squashed
);
compose_base85_guid
(
component
,
comp_base85
,
comp_squashed
);
compose_base85_guid
(
component
,
comp_base85
,
comp_squashed
);
get_user_sid
(
&
usersid
);
get_user_sid
(
&
usersid
);
...
@@ -1782,10 +1798,17 @@ START_TEST(msi)
...
@@ -1782,10 +1798,17 @@ START_TEST(msi)
test_null
();
test_null
();
test_getcomponentpath
();
test_getcomponentpath
();
test_MsiGetFileHash
();
test_MsiGetFileHash
();
test_MsiQueryProductState
();
test_MsiQueryFeatureState
();
if
(
!
pConvertSidToStringSidA
)
test_MsiQueryComponentState
();
skip
(
"ConvertSidToStringSidA not implemented
\n
"
);
test_MsiGetComponentPath
();
else
test_MsiGetProductCode
();
{
test_MsiEnumClients
();
/* These tests rely on get_user_sid that needs ConvertSidToStringSidA */
test_MsiQueryProductState
();
test_MsiQueryFeatureState
();
test_MsiQueryComponentState
();
test_MsiGetComponentPath
();
test_MsiGetProductCode
();
test_MsiEnumClients
();
}
}
}
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