This commit is contained in:
Sergey Lyubka committed 2014-12-30 03:56:29 +00:00
1 parent 03a82ef848
commit e4ad3010be
2 files changed
+8 -7

No files matched your search

+3 -2
View File
@@ -306,9 +306,9 @@ static const char *test_base64_encode(void) {
}
static const char *test_mg_parse_header(void) {
const char *str = "xx=1 kl yy, ert=234 kl=123, "
const char *str = "xx=1 kl yy, ert=234 kl=123, uri=\"/?name=x,y\", "
"ii=\"12\\\"34\" zz='aa bb',tt=2,gf=\"xx d=1234";
char buf[10];
char buf[20];
ASSERT(mg_parse_header(str, "yy", buf, sizeof(buf)) == 0);
ASSERT(mg_parse_header(str, "ert", buf, sizeof(buf)) == 3);
ASSERT(strcmp(buf, "234") == 0);
@@ -331,6 +331,7 @@ static const char *test_mg_parse_header(void) {
ASSERT(strcmp(buf, "12\"34") == 0);
ASSERT(mg_parse_header(str, "tt", buf, sizeof(buf)) == 1);
ASSERT(strcmp(buf, "2") == 0);
ASSERT(mg_parse_header(str, "uri", buf, sizeof(buf)) == 10);
return NULL;
}