Commit aadcba88 authored by Pekka Pessi's avatar Pekka Pessi

Test msg_fragment_clear_chain().

parent eb3c3dff
......@@ -606,7 +606,7 @@ int test_msg_parsing(void)
msg_status_t *status;
msg_content_location_t *location;
msg_content_language_t *language;
msg_accept_language_t *se;
msg_accept_language_t *en, *se;
msg_separator_t *separator;
msg_payload_t *payload;
......@@ -614,7 +614,9 @@ int test_msg_parsing(void)
msg = read_msg("GET a-life HTTP/1.1" CRLF
"Content-Length: 6" CRLF
"Accept-Encoding: bzip2" CRLF
"Accept-Language: en;q=0.8, fi, se ; q = 0.6" CRLF
"Accept-Encoding: gzip" CRLF
"Foo: bar" CRLF
CRLF
"test" CRLF);
......@@ -671,6 +673,14 @@ int test_msg_parsing(void)
TEST(vi, 0);
}
/* Test msg_fragment_clear_chain() */
en = tst->msg_accept_language;
TEST_1(en->aa_common->h_data != NULL);
msg_fragment_clear_chain((msg_header_t *)en->aa_next->aa_next);
TEST_1(en->aa_common->h_data == NULL);
TEST_1(en->aa_next->aa_common->h_data == NULL);
TEST_1(en->aa_next->aa_next->aa_common->h_data == NULL);
msg_destroy(msg);
/* Bug #2624: */
......
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