develooper Front page | perl.perl5.porters | Postings from September 2012

Re: [perl #114296] Refactor t/op/lop.t to use test.pl instead ofmaking TAP by hand

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
September 14, 2012 04:34
Subject:
Re: [perl #114296] Refactor t/op/lop.t to use test.pl instead ofmaking TAP by hand
Message ID:
20120914113446.GP3538@iabyn.com
On Wed, Aug 29, 2012 at 09:36:18PM +0100, Nicholas Clark wrote:
> On Sat, Jul 28, 2012 at 02:21:05PM -0700, Colin Kuskie wrote:
> > I stayed away from using done_testing in this patch since someone 
> > corrected one of the earlier ones where I did use it.
> 
> We don't all agree on everything. I personally tend to find it easier
> (because I hate repeatedly re-editing test conts, and I guess historically
> I also got burned by them often conflicting on maint-branch integrations)

As the 5.10.1 maint pumpking, I also hated all the merge conflicts caused
by updates to the test count. However, I *really* hate the idea that some
tests are quietly dying or misbehaving or being skipped, and we never
notice.

I've wondered from time to time whether the test infrastructure could be
made to deduce the test count from code comments, e.g.

    plan(use_comments);

    # TESTS=2
    {
	is(...);
	is(...);
    }

    # TESTS=3
    {
	is(...);
	is(...);
	is(...);
    }

so plan() scans the source file and sums all the TESTS=N.

-- 
In my day, we used to edit the inodes by hand.  With magnets.

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