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
edac581d
Commit
edac581d
authored
Apr 16, 2009
by
Nicolas Le Cam
Committed by
Alexandre Julliard
Apr 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Test MsiRecordGetString on null and empty strings.
parent
f82a086f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
record.c
dlls/msi/tests/record.c
+33
-1
No files found.
dlls/msi/tests/record.c
View file @
edac581d
...
...
@@ -122,15 +122,47 @@ static void test_msirecord(void)
r
=
MsiRecordGetInteger
(
h
,
0
);
ok
(
r
==
1
,
"failed to get integer
\n
"
);
/* same record, but add a string to it */
/* same record, but add a
null or empty
string to it */
r
=
MsiRecordSetString
(
h
,
0
,
NULL
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to set null string at 0
\n
"
);
r
=
MsiRecordIsNull
(
h
,
0
);
ok
(
r
==
TRUE
,
"null string not null field
\n
"
);
r
=
MsiRecordDataSize
(
h
,
0
);
ok
(
r
==
0
,
"size of string record is strlen
\n
"
);
buf
[
0
]
=
0
;
sz
=
sizeof
buf
;
r
=
MsiRecordGetStringA
(
h
,
0
,
buf
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to get string at 0
\n
"
);
ok
(
buf
[
0
]
==
0
,
"MsiRecordGetStringA returned the wrong string
\n
"
);
ok
(
sz
==
0
,
"MsiRecordGetStringA returned the wrong length
\n
"
);
bufW
[
0
]
=
0
;
sz
=
sizeof
bufW
/
sizeof
bufW
[
0
];
r
=
MsiRecordGetStringW
(
h
,
0
,
bufW
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to get string at 0
\n
"
);
ok
(
bufW
[
0
]
==
0
,
"MsiRecordGetStringW returned the wrong string
\n
"
);
todo_wine
ok
(
sz
==
0
,
"MsiRecordGetStringW returned the wrong length
\n
"
);
r
=
MsiRecordSetString
(
h
,
0
,
""
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to set empty string at 0
\n
"
);
r
=
MsiRecordIsNull
(
h
,
0
);
ok
(
r
==
TRUE
,
"null string not null field
\n
"
);
r
=
MsiRecordDataSize
(
h
,
0
);
ok
(
r
==
0
,
"size of string record is strlen
\n
"
);
buf
[
0
]
=
0
;
sz
=
sizeof
buf
;
r
=
MsiRecordGetStringA
(
h
,
0
,
buf
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to get string at 0
\n
"
);
ok
(
buf
[
0
]
==
0
,
"MsiRecordGetStringA returned the wrong string
\n
"
);
ok
(
sz
==
0
,
"MsiRecordGetStringA returned the wrong length
\n
"
);
bufW
[
0
]
=
0
;
sz
=
sizeof
bufW
/
sizeof
bufW
[
0
];
r
=
MsiRecordGetStringW
(
h
,
0
,
bufW
,
&
sz
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to get string at 0
\n
"
);
ok
(
bufW
[
0
]
==
0
,
"MsiRecordGetStringW returned the wrong string
\n
"
);
todo_wine
ok
(
sz
==
0
,
"MsiRecordGetStringW returned the wrong length
\n
"
);
/* same record, but add a string to it */
r
=
MsiRecordSetString
(
h
,
0
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to set string at 0
\n
"
);
r
=
MsiRecordGetInteger
(
h
,
0
);
...
...
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