Commit 05fa6773 authored by Sergey Lyubka's avatar Sergey Lyubka

Fixed unit test to accomodate mg_get_var() API change

parent ab3c070e
...@@ -255,11 +255,11 @@ static void test_mg_get_var(void) { ...@@ -255,11 +255,11 @@ static void test_mg_get_var(void) {
ASSERT(buf[0] == '\0'); ASSERT(buf[0] == '\0');
ASSERT(mg_get_var(post[0], strlen(post[0]), "d", buf, sizeof(buf)) == -1); ASSERT(mg_get_var(post[0], strlen(post[0]), "d", buf, sizeof(buf)) == -1);
ASSERT(mg_get_var(post[0], strlen(post[0]), "c", buf, 2) == -1); ASSERT(mg_get_var(post[0], strlen(post[0]), "c", buf, 2) == -2);
ASSERT(mg_get_var(post[0], strlen(post[0]), "x", NULL, 10) == -2); ASSERT(mg_get_var(post[0], strlen(post[0]), "x", NULL, 10) == -2);
ASSERT(mg_get_var(post[0], strlen(post[0]), "x", buf, 0) == -2); ASSERT(mg_get_var(post[0], strlen(post[0]), "x", buf, 0) == -2);
ASSERT(mg_get_var(post[1], strlen(post[1]), "st", buf, 16) == -1); ASSERT(mg_get_var(post[1], strlen(post[1]), "st", buf, 16) == -2);
ASSERT(mg_get_var(post[1], strlen(post[1]), "st", buf, 17) == 16); ASSERT(mg_get_var(post[1], strlen(post[1]), "st", buf, 17) == 16);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment