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: [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: [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

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

2001-10-22 Thread Graham Barr
Any patches to modules from libnet, and test additions, should be against the latest libnet on CPAN, I do not want the core to diverge. So if a test depends on a module in the core it should check that the module is avaliable, so that the test is skipped with older perl releases. Graham. On Sat,

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

2001-10-22 Thread chromatic
On Monday 22 October 2001 14:13, Graham Barr wrote: > > I understood that as Graham being unsure about using Test::More in the > > tests. > Actually I was refering to Mock::Socket Would you be amenable to a patch that moves that into the .t file? There's no technical reason it has to be a modu

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

2001-10-22 Thread Graham Barr
On Mon, Oct 22, 2001 at 02:14:43PM -0600, chromatic wrote: > On Monday 22 October 2001 14:13, Graham Barr wrote: > > > > I understood that as Graham being unsure about using Test::More in the > > > tests. > > > Actually I was refering to Mock::Socket > > Would you be amenable to a patch that mo

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

2001-10-22 Thread Michael G Schwern
On Mon, Oct 22, 2001 at 02:08:05PM -0600, chromatic wrote: > > > So if a test depends on a module in the core it should check that > > > the module is avaliable, so that the test is skipped with older > > > perl releases. > > But this is a little funny. How are these new tests going to wind up >

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

2001-10-22 Thread Graham Barr
On Mon, Oct 22, 2001 at 04:27:51PM -0400, Michael G Schwern wrote: > On Mon, Oct 22, 2001 at 02:08:05PM -0600, chromatic wrote: > > > > So if a test depends on a module in the core it should check that > > > > the module is avaliable, so that the test is skipped with older > > > > perl releases. >

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

2001-10-22 Thread Jarkko Hietaniemi
On Mon, Oct 22, 2001 at 09:25:24PM +0100, Graham Barr wrote: > On Mon, Oct 22, 2001 at 04:27:51PM -0400, Michael G Schwern wrote: > > On Mon, Oct 22, 2001 at 02:08:05PM -0600, chromatic wrote: > > > > > So if a test depends on a module in the core it should check that > > > > > the module is avali

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

2001-10-22 Thread chromatic
On Monday 22 October 2001 14:10, Michael G Schwern wrote: > I can understand this. We should be patching the CPAN libnet. In progress. > > So if a test depends on a module in the core it should check that > > the module is avaliable, so that the test is skipped with older > > perl releases. >

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

2001-10-22 Thread Michael G Schwern
On Mon, Oct 22, 2001 at 01:44:32PM +0100, Graham Barr wrote: > Any patches to modules from libnet, and test additions, should be > against the latest libnet on CPAN, I do not want the core to diverge. I can understand this. We should be patching the CPAN libnet. > So if a test depends on a mod

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

2001-10-22 Thread Graham Barr
On Mon, Oct 22, 2001 at 04:10:06PM -0400, Michael G Schwern wrote: > On Mon, Oct 22, 2001 at 01:44:32PM +0100, Graham Barr wrote: > > Any patches to modules from libnet, and test additions, should be > > against the latest libnet on CPAN, I do not want the core to diverge. > > I can understand th

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

2001-10-22 Thread Graham Barr
On Mon, Oct 22, 2001 at 02:08:05PM -0600, chromatic wrote: > On Monday 22 October 2001 14:10, Michael G Schwern wrote: > > > I can understand this. We should be patching the CPAN libnet. > > In progress. > > > > So if a test depends on a module in the core it should check that > > > the module