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
002af352
Commit
002af352
authored
Aug 18, 2016
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Aug 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcomm/tests: Add Attachment tests.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0cea0605
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
mimeole.c
dlls/inetcomm/tests/mimeole.c
+53
-0
No files found.
dlls/inetcomm/tests/mimeole.c
View file @
002af352
...
@@ -338,6 +338,59 @@ static void test_CreateMessage(void)
...
@@ -338,6 +338,59 @@ static void test_CreateMessage(void)
hr
=
IMimeMessage_GetAttachments
(
msg
,
&
count
,
&
body_list
);
hr
=
IMimeMessage_GetAttachments
(
msg
,
&
count
,
&
body_list
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
count
==
2
,
"got %d
\n
"
,
count
);
ok
(
count
==
2
,
"got %d
\n
"
,
count
);
if
(
count
==
2
)
{
ENCODINGTYPE
encoding
;
IMimeBody
*
attachment
;
PROPVARIANT
prop
;
PropVariantInit
(
&
prop
);
hr
=
IMimeMessage_BindToObject
(
msg
,
body_list
[
0
],
&
IID_IMimeBody
,
(
void
**
)
&
attachment
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_IsContentType
(
attachment
,
"multipart"
,
NULL
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetCurrentEncoding
(
attachment
,
&
encoding
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
todo_wine
ok
(
encoding
==
IET_8BIT
,
"ret %d
\n
"
,
encoding
);
prop
.
vt
=
VT_LPSTR
;
hr
=
IMimeBody_GetProp
(
attachment
,
"Content-Transfer-Encoding"
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
prop
.
vt
==
VT_LPSTR
,
"type %d
\n
"
,
prop
.
vt
);
ok
(
!
strcmp
(
prop
.
u
.
pszVal
,
"8bit"
),
"got %s
\n
"
,
prop
.
u
.
pszVal
);
PropVariantClear
(
&
prop
);
hr
=
IMimeBody_IsType
(
attachment
,
IBT_ATTACHMENT
);
todo_wine
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
IMimeBody_Release
(
attachment
);
hr
=
IMimeMessage_BindToObject
(
msg
,
body_list
[
1
],
&
IID_IMimeBody
,
(
void
**
)
&
attachment
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_IsContentType
(
attachment
,
"multipart"
,
NULL
);
ok
(
hr
==
S_FALSE
,
"ret %08x
\n
"
,
hr
);
hr
=
IMimeBody_GetCurrentEncoding
(
attachment
,
&
encoding
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
todo_wine
ok
(
encoding
==
IET_7BIT
,
"ret %d
\n
"
,
encoding
);
prop
.
vt
=
VT_LPSTR
;
hr
=
IMimeBody_GetProp
(
attachment
,
"Content-Transfer-Encoding"
,
0
,
&
prop
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
ok
(
prop
.
vt
==
VT_LPSTR
,
"type %d
\n
"
,
prop
.
vt
);
ok
(
!
strcmp
(
prop
.
u
.
pszVal
,
"7bit"
),
"got %s
\n
"
,
prop
.
u
.
pszVal
);
PropVariantClear
(
&
prop
);
hr
=
IMimeBody_IsType
(
attachment
,
IBT_ATTACHMENT
);
ok
(
hr
==
S_OK
,
"ret %08x
\n
"
,
hr
);
IMimeBody_Release
(
attachment
);
}
CoTaskMemFree
(
body_list
);
CoTaskMemFree
(
body_list
);
hr
=
IMimeBody_GetCharset
(
body
,
&
hcs
);
hr
=
IMimeBody_GetCharset
(
body
,
&
hcs
);
...
...
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