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
4fade6d3
Commit
4fade6d3
authored
Aug 07, 2006
by
James Hawkins
Committed by
Alexandre Julliard
Aug 08, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add tests for MsiGetProperty.
parent
bdbffd97
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
package.c
dlls/msi/tests/package.c
+45
-0
No files found.
dlls/msi/tests/package.c
View file @
4fade6d3
...
...
@@ -1737,6 +1737,50 @@ static void test_states(void)
MsiCloseHandle
(
hpkg
);
}
static
void
test_getproperty
(
void
)
{
MSIHANDLE
hPackage
=
0
;
char
prop
[
100
];
DWORD
size
;
UINT
r
;
hPackage
=
package_from_db
(
create_package_db
());
ok
(
hPackage
!=
0
,
" Failed to create package
\n
"
);
/* set the property */
r
=
MsiSetProperty
(
hPackage
,
"Name"
,
"Value"
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* retrieve the size, NULL pointer */
size
=
0
;
r
=
MsiGetProperty
(
hPackage
,
"Name"
,
NULL
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
size
==
5
,
"Expected 5, got %ld
\n
"
,
size
);
/* retrieve the size, empty string */
size
=
0
;
r
=
MsiGetProperty
(
hPackage
,
"Name"
,
""
,
&
size
);
ok
(
r
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
r
);
ok
(
size
==
5
,
"Expected 5, got %ld
\n
"
,
size
);
/* don't change size */
r
=
MsiGetProperty
(
hPackage
,
"Name"
,
prop
,
&
size
);
ok
(
r
==
ERROR_MORE_DATA
,
"Expected ERROR_MORE_DATA, got %d
\n
"
,
r
);
ok
(
size
==
5
,
"Expected 5, got %ld
\n
"
,
size
);
ok
(
!
lstrcmp
(
prop
,
"Valu"
),
"Expected Valu, got %s
\n
"
,
prop
);
/* increase the size by 1 */
size
++
;
r
=
MsiGetProperty
(
hPackage
,
"Name"
,
prop
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
ok
(
size
==
5
,
"Expected 5, got %ld
\n
"
,
size
);
ok
(
!
lstrcmp
(
prop
,
"Value"
),
"Expected Value, got %s
\n
"
,
prop
);
r
=
MsiCloseHandle
(
hPackage
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to close package
\n
"
);
DeleteFile
(
msifile
);
}
START_TEST
(
package
)
{
test_createpackage
();
...
...
@@ -1750,4 +1794,5 @@ START_TEST(package)
test_msipackage
();
test_formatrecord2
();
test_states
();
test_getproperty
();
}
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