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
68bfb397
Commit
68bfb397
authored
May 17, 2007
by
Misha Koshelev
Committed by
Alexandre Julliard
May 17, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Add test for empty MsiGetProductInfo parameters not referencing default registry values.
parent
b3d32c8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
msi.c
dlls/msi/tests/msi.c
+62
-0
No files found.
dlls/msi/tests/msi.c
View file @
68bfb397
...
...
@@ -81,6 +81,9 @@ static void test_null(void)
{
MSIHANDLE
hpkg
;
UINT
r
;
HKEY
hkey
;
DWORD
dwType
,
cbData
;
LPBYTE
lpData
=
NULL
;
r
=
pMsiOpenPackageExW
(
NULL
,
0
,
&
hpkg
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"wrong error
\n
"
);
...
...
@@ -102,6 +105,65 @@ static void test_null(void)
r
=
MsiConfigureFeatureA
(
"{00000000-0000-0000-0000-000000000000}"
,
"foo"
,
INSTALLSTATE_DEFAULT
);
ok
(
r
==
ERROR_UNKNOWN_PRODUCT
,
"wrong error %d
\n
"
,
r
);
/* make sure empty string to MsiGetProductInfo is not a handle to default registry value, saving and restoring the
* necessary registry values */
/* empty product string */
r
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Uninstall"
,
&
hkey
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
r
=
RegQueryValueExA
(
hkey
,
NULL
,
0
,
&
dwType
,
lpData
,
&
cbData
);
ok
(
r
==
ERROR_SUCCESS
||
r
==
ERROR_FILE_NOT_FOUND
,
"wrong error %d
\n
"
,
r
);
if
(
r
==
ERROR_SUCCESS
)
{
lpData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cbData
);
if
(
!
lpData
)
skip
(
"Out of memory
\n
"
);
else
{
r
=
RegQueryValueExA
(
hkey
,
NULL
,
0
,
&
dwType
,
lpData
,
&
cbData
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
}
}
r
=
RegSetValueA
(
hkey
,
NULL
,
REG_SZ
,
"test"
,
strlen
(
"test"
));
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
r
=
MsiGetProductInfoA
(
""
,
""
,
NULL
,
NULL
);
todo_wine
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"wrong error %d
\n
"
,
r
);
if
(
lpData
)
{
r
=
RegSetValueExA
(
hkey
,
NULL
,
0
,
dwType
,
lpData
,
cbData
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
HeapFree
(
GetProcessHeap
(),
0
,
lpData
);
}
else
{
r
=
RegDeleteValueA
(
hkey
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
}
r
=
RegCloseKey
(
hkey
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
/* empty attribute */
r
=
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Uninstall
\\
{F1C3AF50-8B56-4A69-A00C-00773FE42F30}"
,
&
hkey
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
r
=
RegSetValueA
(
hkey
,
NULL
,
REG_SZ
,
"test"
,
strlen
(
"test"
));
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
r
=
MsiGetProductInfoA
(
"{F1C3AF50-8B56-4A69-A00C-00773FE42F30}"
,
""
,
NULL
,
NULL
);
todo_wine
ok
(
r
==
ERROR_UNKNOWN_PROPERTY
,
"wrong error %d
\n
"
,
r
);
r
=
RegCloseKey
(
hkey
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
r
=
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
"SOFTWARE
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Uninstall
\\
{F1C3AF50-8B56-4A69-A00C-00773FE42F30}"
);
ok
(
r
==
ERROR_SUCCESS
,
"wrong error %d
\n
"
,
r
);
}
static
void
test_getcomponentpath
(
void
)
...
...
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