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
00558c29
Commit
00558c29
authored
Apr 19, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Apr 22, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm/tests: Add IMimeMessage SetOption tests.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84cf8ca0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
63 additions
and
0 deletions
+63
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+63
-0
No files found.
dlls/inetcomm/tests/mimeole.c
View file @
00558c29
...
@@ -332,6 +332,68 @@ static void test_CreateMessage(void)
...
@@ -332,6 +332,68 @@ static void test_CreateMessage(void)
IStream_Release
(
stream
);
IStream_Release
(
stream
);
}
}
static
void
test_MessageOptions
(
void
)
{
static
const
char
string
[]
=
"XXXXX"
;
static
const
char
zero
[]
=
"0"
;
HRESULT
hr
;
IMimeMessage
*
msg
;
PROPVARIANT
prop
;
hr
=
MimeOleCreateMessage
(
NULL
,
&
msg
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantInit
(
&
prop
);
prop
.
vt
=
VT_BOOL
;
prop
.
u
.
boolVal
=
TRUE
;
hr
=
IMimeMessage_SetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
hr
=
IMimeMessage_GetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
todo_wine
ok
(
prop
.
vt
==
VT_BOOL
,
"vt %08x
\n
"
,
prop
.
vt
);
todo_wine
ok
(
prop
.
u
.
boolVal
==
TRUE
,
"Hide Attachments got %d
\n
"
,
prop
.
u
.
boolVal
);
PropVariantClear
(
&
prop
);
prop
.
vt
=
VT_LPSTR
;
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
string
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
string
);
hr
=
IMimeMessage_SetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
hr
=
IMimeMessage_GetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
todo_wine
ok
(
prop
.
vt
==
VT_BOOL
,
"vt %08x
\n
"
,
prop
.
vt
);
todo_wine
ok
(
prop
.
u
.
boolVal
==
TRUE
,
"Hide Attachments got %d
\n
"
,
prop
.
u
.
boolVal
);
PropVariantClear
(
&
prop
);
/* Invalid property type doesn't change the value */
prop
.
vt
=
VT_LPSTR
;
prop
.
u
.
pszVal
=
CoTaskMemAlloc
(
strlen
(
zero
)
+
1
);
strcpy
(
prop
.
u
.
pszVal
,
zero
);
hr
=
IMimeMessage_SetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
hr
=
IMimeMessage_GetOption
(
msg
,
OID_HIDE_TNEF_ATTACHMENTS
,
&
prop
);
todo_wine
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
todo_wine
ok
(
prop
.
vt
==
VT_BOOL
,
"vt %08x
\n
"
,
prop
.
vt
);
todo_wine
ok
(
prop
.
u
.
boolVal
==
TRUE
,
"Hide Attachments got %d
\n
"
,
prop
.
u
.
boolVal
);
PropVariantClear
(
&
prop
);
/* Invalid OID */
prop
.
vt
=
VT_BOOL
;
prop
.
u
.
boolVal
=
TRUE
;
hr
=
IMimeMessage_SetOption
(
msg
,
0xff00000a
,
&
prop
);
todo_wine
ok
(
hr
==
MIME_E_INVALID_OPTION_ID
,
"ret %08x
\n
"
,
hr
);
PropVariantClear
(
&
prop
);
IMimeMessage_Release
(
msg
);
}
void
test_BindToObject
(
void
)
void
test_BindToObject
(
void
)
{
{
HRESULT
hr
;
HRESULT
hr
;
...
@@ -372,6 +434,7 @@ START_TEST(mimeole)
...
@@ -372,6 +434,7 @@ START_TEST(mimeole)
test_CreateBody
();
test_CreateBody
();
test_Allocator
();
test_Allocator
();
test_CreateMessage
();
test_CreateMessage
();
test_MessageOptions
();
test_BindToObject
();
test_BindToObject
();
test_MimeOleGetPropertySchema
();
test_MimeOleGetPropertySchema
();
OleUninitialize
();
OleUninitialize
();
...
...
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