]> git.ozlabs.org Git - ccan/commit - ccan/rfc822/test/testdata.h
rfc822: Allow test infrastructure to handle headers with minor errors
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 4 Oct 2012 14:35:11 +0000 (00:35 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 5 Oct 2012 03:22:01 +0000 (13:22 +1000)
commit850364146a1cc66a92943f43dc4012d9c70902eb
treee27e7dd8855cd39ec36f7f0ca400c173210106ae
parentd638b7e4d67ea147a35e8e4c3b41e85e35cf9d97
rfc822: Allow test infrastructure to handle headers with minor errors

Currently the test infrastructure for constructing example messages then
parsing them assumes that constructed headers never have errors of any
kind.  That's true so far, but it limits the versatility of this test
apparatus.  This patch extends the infrastructure to allow minor errors
(that is things other than a missing colon) to be handled.  The existing
test data is also extended to include cases which use this.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
ccan/rfc822/test/helper.c
ccan/rfc822/test/helper.h
ccan/rfc822/test/run-hdr-and-body.c
ccan/rfc822/test/testdata.h