Re: [proposed PATCH installhtml] Re: installhtml needs a good beating out

2001-10-20 Thread Jarkko Hietaniemi
On Sat, Oct 20, 2001 at 04:25:02PM -0400, Michael G Schwern wrote: > On Sat, Oct 20, 2001 at 06:25:20PM +0300, Jarkko Hietaniemi wrote: > > You have been drinking deeply from the fount of the QA Kool-Aid, > > haven't you? I'm probably not going to be surprised one day to > > find a regression tes

Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread chromatic
In article <[EMAIL PROTECTED]>, "Jarkko Hietaniemi" <[EMAIL PROTECTED]> wrote: >> 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. >

Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread Jarkko Hietaniemi
> Net::Config doesn't care *how* inet_ntoa and inet_aton do their job. > It just cares that it gets data in the right format. Tying STDIN So why is this tested using a mock-up by Net::Config? Sounds like a job the Socket should be testing (and it is). > and feeding fake input to Term::Complete

Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread chromatic
On Saturday 20 October 2001 11:54, you wrote: > So why is this tested using a mock-up by Net::Config? Sounds like > a job the Socket should be testing (and it is). Oh, no! It's not. Mock::Socket is just a dummy object with the same interface as Socket. It lets the test control the data sent

Re: Mock::Socket and the Essentials of Testing libnet

2001-10-20 Thread chromatic
In article <20011021000950.I588@blackrider>, "Michael G Schwern" <[EMAIL PROTECTED]> wrote: > For libnet it happens to work out that the untestable part (the network > connection) is incidental. The testable part (the protocol) is essential. > That's the sweet spot. If we can seperate the net c

Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread Jarkko Hietaniemi
On Sat, Oct 20, 2001 at 12:04:49PM -0600, chromatic wrote: > On Saturday 20 October 2001 11:54, you wrote: > > > So why is this tested using a mock-up by Net::Config? Sounds like > > a job the Socket should be testing (and it is). > > Oh, no! It's not. Mock::Socket is just a dummy object with

Re: installhtml needs a good beating out

2001-10-20 Thread Rafael Garcia-Suarez
On 2001.10.20 17:16 Jarkko Hietaniemi wrote: > On Sat, Oct 20, 2001 at 02:02:59AM -0400, Michael G Schwern wrote: > > > > > > I think installhtml teeters heavily on the brink of "Rewriting" > > > instead of "Refactoring". It hasn't changed much since 1997. > > > > Refactoring is just rewriting

Re: Preliminary test coverage analysis

2001-10-20 Thread Paul Johnson
On Thu, Oct 18, 2001 at 10:42:33PM -0400, Michael G Schwern wrote: > On Thu, Oct 18, 2001 at 12:07:26AM -0600, chromatic wrote: > > > - Of those covered, a smidge less than half have < 75% statement coverage. - " > > >" " , 20% have < 50% statement coverage. > > > > Is it possible to ge

[PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread chromatic
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

Re: [PATCH lib/Net/Config.pm, MANIFEST, t/lib/Mock/Socket.pm, lib/Net/Config.t] Add Tests for Net::Config

2001-10-20 Thread Jarkko Hietaniemi
> 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

Mock::Socket and the Essentials of Testing libnet

2001-10-20 Thread Michael G Schwern
When looking at something that's going to prove nasty to test, you can apply the same criteria as Holmes: Once we remove the untestable, what remains, however difficult, must be testable. What's the problem with testing libnet? The network connection. We can't guarantee that the machine will ha

Re: installhtml needs a good beating out

2001-10-20 Thread Jarkko Hietaniemi
On Sat, Oct 20, 2001 at 02:02:59AM -0400, Michael G Schwern wrote: > On Sat, Oct 20, 2001 at 08:58:11AM +0300, Jarkko Hietaniemi wrote: > > > Once you've done that you can add "Refactoring" to the list of > > > buzzwords on your resume. :) > > > > I think installhtml teeters heavily on the brink

Re: [proposed PATCH installhtml] Re: installhtml needs a good beating out

2001-10-20 Thread Michael G Schwern
On Sat, Oct 20, 2001 at 06:25:20PM +0300, Jarkko Hietaniemi wrote: > You have been drinking deeply from the fount of the QA Kool-Aid, > haven't you? I'm probably not going to be surprised one day to > find a regression test for Configure waiting in my inbox. Would you mind it if you did? ;) --

Re: [proposed PATCH installhtml] Re: installhtml needs a good beating out

2001-10-20 Thread Jarkko Hietaniemi
On Sat, Oct 20, 2001 at 01:54:14AM -0600, chromatic wrote: > In article <20011020014825.J3681@blackrider>, "Michael G Schwern" > <[EMAIL PROTECTED]> wrote: > > > Convert from $opt_* globals to an %Options hash > > A fun use of map! > > Is there a test for this beast? A quick 'perl -wc inst

[REPATCH installhtml] Re: installhtml needs a good beating out

2001-10-20 Thread chromatic
In article <[EMAIL PROTECTED]>, "Johan Vromans" <[EMAIL PROTECTED]> wrote: > I'm not sure what you are trying to achieve with this. Really really small incremental changes? > The net efffect is that you get something like > > GetOptions('foo' => \$Options{foo}, 'bar=s' => \$Options{bar}

Re: Preliminary test coverage analysis

2001-10-20 Thread Michael G Schwern
On Sat, Oct 20, 2001 at 10:37:01PM +0200, Paul Johnson wrote: > By the way, I got rid of perl-qa-metrics. It's basically dead, right? Basically. -- Michael G. Schwern <[EMAIL PROTECTED]>http://www.pobox.com/~schwern/ Perl6 Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job

Re: [proposed PATCH installhtml] Re: installhtml needs a good beating out

2001-10-20 Thread Johan Vromans
> # parse the command-line > -my $result = GetOptions( qw( > +my $result = GetOptions( map { > + my $key = $_; > + $key =~ s/\W.+$//; > + $key => \$Options{$_}; > +} qw( > help > podpath=s > podroot=s I'm not sure what you are trying to a

[proposed PATCH installhtml] Re: installhtml needs a good beating out

2001-10-20 Thread chromatic
In article <20011020014825.J3681@blackrider>, "Michael G Schwern" <[EMAIL PROTECTED]> wrote: > Convert from $opt_* globals to an %Options hash A fun use of map! Is there a test for this beast? A quick 'perl -wc installhtml' verified that it compiles, but refactoring's half complete without