[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

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've

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 get an update on

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

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. I'm not

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: 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 in small pieces.

[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

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

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 installhtml'

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've

[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