Skip to content

Commit

Permalink
[mms-lib] Added retrieve/Success3 test case
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Mar 27, 2014
1 parent d83579a commit f366735
Show file tree
Hide file tree
Showing 15 changed files with 46 additions and 10 deletions.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
17 changes: 17 additions & 0 deletions mms-lib/test/retrieve/data/Success3/parts/0
@@ -0,0 +1,17 @@
<smil>
<head>
<layout>
<root-layout/>
<region width="100%" height="30%" left="0%" fit="scroll" id="Text" top="0%"/>
<region width="100%" height="70%" left="0%" fit="meet" id="Image" top="30%"/>
</layout>
</head>
<body>
<par dur="5s">
<img region="Image" src="cid:1"/>
</par>
<par dur="5s">
<text region="Text" src="cid:2"/>
</par>
</body>
</smil>
Binary file added mms-lib/test/retrieve/data/Success3/parts/1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions mms-lib/test/retrieve/data/Success3/parts/text_001.txt
@@ -0,0 +1 @@
Баночка
38 changes: 28 additions & 10 deletions mms-lib/test/retrieve/test_retrieve.c
Expand Up @@ -72,7 +72,7 @@ typedef struct test {
int ret;
} Test;

static const TestPartDesc retrieve_success_parts [] = {
static const TestPartDesc retrieve_success1_parts [] = {
{ "application/smil;charset=utf-8", "<0>", "0.smil" },
{ "text/plain;charset=utf-8", "<text_0011.txt>", "text_0011.txt" },
{ "image/jpeg", "<131200181.jpg>", "131200181.jpg" },
Expand All @@ -86,12 +86,18 @@ static const TestPartDesc retrieve_success2_parts [] = {
{ "application/smil;charset=utf-8", "<332047400>", "332047400" },
};

static const TestPartDesc retrieve_success3_parts [] = {
{ "application/smil;charset=utf-8", "<0>", "0" },
{ "image/jpeg", "<1>", "1.jpg" },
{ "text/plain;charset=utf-8", "<2>", "text_001.txt" }
};

#define TEST_PARTS(parts) parts, G_N_ELEMENTS(parts)
#define TEST_PARTS_NONE NULL, 0

static const TestDesc retrieve_tests[] = {
{
"Success",
"Success1",
NULL,
"m-notification.ind",
"m-retrieve.conf",
Expand All @@ -100,22 +106,22 @@ static const TestDesc retrieve_tests[] = {
NULL,
MMS_RECEIVE_STATE_DECODING,
MMS_MESSAGE_TYPE_ACKNOWLEDGE_IND,
TEST_PARTS(retrieve_success_parts),
TEST_PARTS(retrieve_success1_parts),
0
},{
"DeferSuccess",
"Success",
},{
"Success2", /* Generated by Nokia C6 (Symbian "Belle") */
NULL,
"m-notification.ind",
"m-retrieve.conf",
SOUP_STATUS_OK,
MMS_CONTENT_TYPE,
NULL,
MMS_RECEIVE_STATE_DECODING,
MMS_MESSAGE_TYPE_ACKNOWLEDGE_IND,
TEST_PARTS(retrieve_success_parts),
TEST_DEFER_RECEIVE
TEST_PARTS(retrieve_success2_parts),
0
},{
"Success2", /* Generated by Nokia C6 (Symbian "Belle") */
"Success3", /* Generated by Nokia N9 */
NULL,
"m-notification.ind",
"m-retrieve.conf",
Expand All @@ -124,8 +130,20 @@ static const TestDesc retrieve_tests[] = {
NULL,
MMS_RECEIVE_STATE_DECODING,
MMS_MESSAGE_TYPE_ACKNOWLEDGE_IND,
TEST_PARTS(retrieve_success2_parts),
TEST_PARTS(retrieve_success3_parts),
0
},{
"DeferSuccess",
"Success1",
"m-notification.ind",
"m-retrieve.conf",
SOUP_STATUS_OK,
MMS_CONTENT_TYPE,
NULL,
MMS_RECEIVE_STATE_DECODING,
MMS_MESSAGE_TYPE_ACKNOWLEDGE_IND,
TEST_PARTS(retrieve_success1_parts),
TEST_DEFER_RECEIVE
},{
"Expired",
NULL,
Expand Down

0 comments on commit f366735

Please sign in to comment.