develooper Front page | perl.perl5.porters | Postings from November 2000

Re: [ID 20001128.002] what's the point of example code if it is buggy?

Thread Previous | Thread Next
From:
Jarkko Hietaniemi
Date:
November 28, 2000 08:02
Subject:
Re: [ID 20001128.002] what's the point of example code if it is buggy?
Message ID:
20001128100142.A28150@chaos.wustl.edu
On Tue, Nov 28, 2000 at 03:53:56PM +0000, Nicholas Clark wrote:
> On Tue, Nov 28, 2000 at 09:43:40AM -0600, Jarkko Hietaniemi wrote:
> > On Tue, Nov 28, 2000 at 11:16:57AM +0000, Nicholas Clark wrote:
> 
> > > 3: Net::hostent doesn't have a regression test to detected that it's shagged.
> > 
> > Writing a portable test that still tests anything useful for the
> > gethost* is tough.  Remember that the contents or the existence of the
> > /etc/hosts file might be largely irrelevant to to results of the
> > gethost* calls.
> 
> $ cat t/lib/net_hostent.t 
> #!./perl -w
> BEGIN { $| = 1; print "1..1\n"; }
> END {print "not ok 1\n" unless $loaded;}
> use Net::hostent;
> $loaded = 1;
> print "ok 1\n";
> 
> It's better than nothing? (cribbed from h2xs)

Well, it's better than nothing, but is that enough for your purposes?

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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About