cURL / Mailing Lists / curl-library / Single Mail


Re: [Patches] Netrc cleanup

From: Daniel Stenberg <>
Date: Tue, 8 Feb 2011 09:05:35 +0100 (CET)

On Mon, 7 Feb 2011, Julien Chaffraix wrote:

>> I guess Curl_parsenetrc() is actually a rather good candidate to add unit
>> tests for...
> Indeed, that's what got me interested in this area of the code in the first
> place. There is a couple of tests that covers it though.
> There is also the DEBUGBUILD code used for testing that could be removed if
> we exposed the right option to curl. I am not sure if this makes sense yet
> and was planning to look into it.

Yes, the existing netrc tests require DEBUGBUILD since they need to be forced
to read a custom $HOME I believe so that they find the test .netrc file
instead of the "actual" one.

We don't have to have those oddities with unit tests for it. Even of course
unit tests themselves also require a certain build setup.

In general though I think unit tests are better for more testing, and in
particular for testing bad cases/code flows that are hard to trigger with the
tool itself.

List admin:
Received on 2011-02-08