]> git.ozlabs.org Git - ccan/blobdiff - ccan/rfc822/test/testdata.h
rfc822: Fix bug parsing headers when body begins with linear whitespace
[ccan] / ccan / rfc822 / test / testdata.h
index ceb3bcd892078e429509d1911988ad5ebbf45ac0..4ef07095474cef88fa940a466f2798e4f7ec79cd 100644 (file)
@@ -53,11 +53,15 @@ AEXAMPLE(test_msg_nlnl_crlf);
 const char test_msg_nlnl_mixed_body[] = "Message containing both \n\n and \r\n\r\n inside body\n\r\n";
 AEXAMPLE(test_msg_nlnl_mixed);
 
 const char test_msg_nlnl_mixed_body[] = "Message containing both \n\n and \r\n\r\n inside body\n\r\n";
 AEXAMPLE(test_msg_nlnl_mixed);
 
+#define test_msg_space_body_hdrs test_msg_1_hdrs
+const char test_msg_space_body_body[] = " Message with LWS at start of body\n";
+AEXAMPLE(test_msg_space_body);
 
 #define for_each_aexample(_e)                               \
        foreach_ptr((_e), &test_msg_1, &test_msg_empty_body, \
                    &test_msg_nlnl_lf, &test_msg_nlnl_crlf, \
 
 #define for_each_aexample(_e)                               \
        foreach_ptr((_e), &test_msg_1, &test_msg_empty_body, \
                    &test_msg_nlnl_lf, &test_msg_nlnl_crlf, \
-                   &test_msg_nlnl_mixed)
+                   &test_msg_nlnl_mixed, \
+                   &test_msg_space_body)
 
 #define for_each_aexample_buf(_e, _buf, _len)  \
        for_each_aexample((_e))                 \
 
 #define for_each_aexample_buf(_e, _buf, _len)  \
        for_each_aexample((_e))                 \