> Here's a test suite for Net::Config.  In the process of writing
> this, I've fixed an apparent bug that prevented single values from
> becoming array references when necessary.  I think it's right, but
> perhaps Graham should weigh in on this.
>
> In the process, with some advice from perl-qa, I've added a mock
> object so the test could control the output of Socket::inet_ntoa()
> and Socket::inet_aton().  t/lib/Mock/ seemed like as good a place as
> any.

I'm not convinced.  By setting up mock-ups you are not testing the
real thing: you are testing mock-ups.  It's real emptying shotguns
at decoys and concluding that yup, we are eating duck tonight.

Testing that the netconfig file works right with the %Netconfig
is nice I think somewhat beside the point.  The format of the
file is irrelevant for the *outward* functionality of libnet.

FWIW, I'm happy with leaving libnet essentially untested because
I think by its very nature it is untestable across all the possible
network configurations.  Try some time using ftp from behind sadistic
firewalls, for example.  Situations like this *can* be configured
to work, most of the time, but it requires a lot of off-line head
scratching, bribing the keepers of the firewalls, things like that.
Things a test suite cannot do unless we make Perl pass the Turing test.

QA incendiary: I think rabidly trying to strap a test harness on
everything that moves is counterproductive.  Not all APIs have been
planned to be tested.  Of course the documentation should tell what
are the public interfaces, but if in doubt, *ask* the author.
Testing for internal not-meant-to-be-seen bits is plain silly.

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

Reply via email to