cURL / Mailing Lists / curl-library / Single Mail

curl-library

PATCH: Improve output of curl's --libcurl option

From: Colin Hogben <curl_at_pythontech.co.uk>
Date: Thu, 22 Dec 2011 16:36:43 +0000

Hi,
The attached patches improve the output of curl's --libcurl option by
generating code to build curl_httppost and curl_slist lists, and use
symbolic names for enum and flag values.

Now, it occurred to me that, as well as testing for regressions in the
--libcurl output, I really ought to check that the generated code really
does work the same as the curl tool with the given options. To this
end, I have written a perl script which takes a test definition (assumed
to be one which exercises --libcurl) and generates a new test, in the
form of (a) a C source file created from the --libcurl output but munged
into the form suitable for libtest source files; and (b) a new test
definition which runs the generated libtest tool instead of curl, but
checks for the same protocol and output.

For the moment, I have not released this but only used it within my own
tree, as I was not sure of the best way to integrate such a tool within
the test framework. It seems like it might be easier to have a clear
mapping so that e.g. test15xx is generated from test14xx. However, I'm
not sure how the makefile logic should be implemented (under two? layers
of autoconf/automake abstraction). Maybe someone can advise.

Anyway, that is why I have grabbed a bunch of numbers in the 1400 range
rather than continuing at 1316. But hey, numbers are cheap and
plentiful :-)

-- 
Colin Hogben
Received on 2011-12-22