Commit b550b8c8 authored by Pieter Noordhuis's avatar Pieter Noordhuis
Browse files

More tests for status and error messages

parent 628a961f
...@@ -442,6 +442,10 @@ void test_status(redis_parser_t *p) { ...@@ -442,6 +442,10 @@ void test_status(redis_parser_t *p) {
assert(res->plen == 9); assert(res->plen == 9);
assert(res->coff == 1); assert(res->coff == 1);
assert(res->clen == 6); assert(res->clen == 6);
assert(!strncmp(cb_log[0].string_buf, buf+1, 6));
/* Chunked check */
test_char_by_char(res, buf, len);
} }
void test_error(redis_parser_t *p) { void test_error(redis_parser_t *p) {
...@@ -458,6 +462,10 @@ void test_error(redis_parser_t *p) { ...@@ -458,6 +462,10 @@ void test_error(redis_parser_t *p) {
assert(res->plen == 8); assert(res->plen == 8);
assert(res->coff == 1); assert(res->coff == 1);
assert(res->clen == 5); assert(res->clen == 5);
assert(!strncmp(cb_log[0].string_buf, buf+1, 5));
/* Chunked check */
test_char_by_char(res, buf, len);
} }
int main(int argc, char **argv) { int main(int argc, char **argv) {
......
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