Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
e579355b
Commit
e579355b
authored
May 08, 2013
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
url_decode -> mg_url_decode
parent
cfbaf7f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
unit_test.c
test/unit_test.c
+7
-7
No files found.
test/unit_test.c
View file @
e579355b
...
...
@@ -580,23 +580,23 @@ static void test_api_calls(void) {
static
void
test_url_decode
(
void
)
{
char
buf
[
100
];
ASSERT
(
url_decode
(
"foo"
,
3
,
buf
,
3
,
0
)
==
-
1
);
// No space for terminating
\0
ASSERT
(
url_decode
(
"foo"
,
3
,
buf
,
4
,
0
)
==
3
);
ASSERT
(
mg_url_decode
(
"foo"
,
3
,
buf
,
3
,
0
)
==
-
1
);
// No space for
\0
ASSERT
(
mg_
url_decode
(
"foo"
,
3
,
buf
,
4
,
0
)
==
3
);
ASSERT
(
strcmp
(
buf
,
"foo"
)
==
0
);
ASSERT
(
url_decode
(
"a+"
,
2
,
buf
,
sizeof
(
buf
),
0
)
==
2
);
ASSERT
(
mg_
url_decode
(
"a+"
,
2
,
buf
,
sizeof
(
buf
),
0
)
==
2
);
ASSERT
(
strcmp
(
buf
,
"a+"
)
==
0
);
ASSERT
(
url_decode
(
"a+"
,
2
,
buf
,
sizeof
(
buf
),
1
)
==
2
);
ASSERT
(
mg_
url_decode
(
"a+"
,
2
,
buf
,
sizeof
(
buf
),
1
)
==
2
);
ASSERT
(
strcmp
(
buf
,
"a "
)
==
0
);
ASSERT
(
url_decode
(
"%61"
,
1
,
buf
,
sizeof
(
buf
),
1
)
==
1
);
ASSERT
(
mg_
url_decode
(
"%61"
,
1
,
buf
,
sizeof
(
buf
),
1
)
==
1
);
ASSERT
(
strcmp
(
buf
,
"%"
)
==
0
);
ASSERT
(
url_decode
(
"%61"
,
2
,
buf
,
sizeof
(
buf
),
1
)
==
2
);
ASSERT
(
mg_
url_decode
(
"%61"
,
2
,
buf
,
sizeof
(
buf
),
1
)
==
2
);
ASSERT
(
strcmp
(
buf
,
"%6"
)
==
0
);
ASSERT
(
url_decode
(
"%61"
,
3
,
buf
,
sizeof
(
buf
),
1
)
==
1
);
ASSERT
(
mg_
url_decode
(
"%61"
,
3
,
buf
,
sizeof
(
buf
),
1
)
==
1
);
ASSERT
(
strcmp
(
buf
,
"a"
)
==
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