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
a1c4d2c9
Commit
a1c4d2c9
authored
Oct 29, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Add a test for embedded nulls in string property values.
parent
232a44ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
3 deletions
+26
-3
format.c
dlls/msi/tests/format.c
+26
-3
No files found.
dlls/msi/tests/format.c
View file @
a1c4d2c9
...
...
@@ -2530,6 +2530,9 @@ static void test_formatrecord_tables(void)
r
=
add_custom_action_entry
(
hdb
,
"'EscapeIt3', 51, 'prop', '[abcd
\\
xefgh]'"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add custom action: %d
\n
"
,
r
);
r
=
add_custom_action_entry
(
hdb
,
"'EmbedNull', 51, 'prop', '[~]np'"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot add custom action: %d
\n
"
,
r
);
r
=
package_from_db
(
hdb
,
&
hpkg
);
if
(
r
==
ERROR_INSTALL_PACKAGE_REJECTED
)
{
...
...
@@ -2661,7 +2664,7 @@ static void test_formatrecord_tables(void)
/* custom action 51, escaped text 1 */
r
=
MsiDoAction
(
hpkg
,
"EscapeIt1"
);
ok
(
r
==
ERROR_SUCCESS
,
"EscapeIt failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"EscapeIt
1
failed: %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"prop"
,
buf
,
&
size
);
...
...
@@ -2670,7 +2673,7 @@ static void test_formatrecord_tables(void)
/* custom action 51, escaped text 2 */
r
=
MsiDoAction
(
hpkg
,
"EscapeIt2"
);
ok
(
r
==
ERROR_SUCCESS
,
"EscapeIt failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"EscapeIt
2
failed: %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"prop"
,
buf
,
&
size
);
...
...
@@ -2679,13 +2682,33 @@ static void test_formatrecord_tables(void)
/* custom action 51, escaped text 3 */
r
=
MsiDoAction
(
hpkg
,
"EscapeIt3"
);
ok
(
r
==
ERROR_SUCCESS
,
"EscapeIt failed: %d
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
,
"EscapeIt
3
failed: %d
\n
"
,
r
);
size
=
MAX_PATH
;
r
=
MsiGetProperty
(
hpkg
,
"prop"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
""
),
"Expected '', got %s
\n
"
,
buf
);
/* custom action 51, embedded null */
r
=
MsiDoAction
(
hpkg
,
"EmbedNull"
);
ok
(
r
==
ERROR_SUCCESS
,
"EmbedNull failed: %d
\n
"
,
r
);
size
=
MAX_PATH
;
memset
(
buf
,
'a'
,
sizeof
(
buf
)
);
r
=
MsiGetProperty
(
hpkg
,
"prop"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
todo_wine
ok
(
!
memcmp
(
buf
,
"
\0
np"
,
sizeof
(
"
\0
np"
)
),
"wrong value
\n
"
);
todo_wine
ok
(
size
==
sizeof
(
"
\0
np"
)
-
1
,
"got %u
\n
"
,
size
);
r
=
MsiSetProperty
(
hpkg
,
"prop"
,
"[~]np"
);
ok
(
r
==
ERROR_SUCCESS
,
"cannot set property: %d
\n
"
,
r
);
size
=
MAX_PATH
;
memset
(
buf
,
'a'
,
sizeof
(
buf
)
);
r
=
MsiGetProperty
(
hpkg
,
"prop"
,
buf
,
&
size
);
ok
(
r
==
ERROR_SUCCESS
,
"get property failed: %d
\n
"
,
r
);
ok
(
!
lstrcmp
(
buf
,
"[~]np"
),
"Expected '[~]np', got %s
\n
"
,
buf
);
sprintf
(
expected
,
"1: %sI am a really long directory
\\
"
,
root
);
/* component with INSTALLSTATE_LOCAL */
...
...
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