Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Test-Simple CPAN distribution.

Report information
The Basics
Id: 35117
Status: resolved
Priority: 0/
Queue: Test-Simple

People
Owner: Nobody in particular
Requestors: akaplan [...] cpan
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.80
Fixed in: (no value)



Subject: T::Builder more strict on 'plan' placement than TAP
The TAP spec says that the plan can be either the first or last line of output (either above or below the diagnostic lines). Test::Builder will refuse to do anything without a predefined test. I think one of the great strengths of T::Builder is that it allows dev's to create tests on the fly... but this is of limited use due to the predefined plan restrictions. I sometimes don't know the plan until the end. Anyway the fix can be pretty straight forward. I wouldn't mind doing it for you.
On Wed Apr 16 09:46:54 2008, AKAPLAN wrote: Show quoted text
> Test::Builder will refuse to do anything without a predefined test.
Should read: Test::Builder will refuse to do anything without a predefined test plan.
Subject: Re: [rt.cpan.org #35117] T::Builder more strict on 'plan' placement than TAP
Date: Wed, 16 Apr 2008 17:57:33 -0700
To: bug-Test-Simple [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
Adam J. Kaplan via RT wrote: Show quoted text
> The TAP spec says that the plan can be either the first or last line of > output (either above or below the diagnostic lines). Test::Builder will > refuse to do anything without a predefined test. > > I think one of the great strengths of T::Builder is that it allows dev's > to create tests on the fly... but this is of limited use due to the > predefined plan restrictions. I sometimes don't know the plan until the > end. > > Anyway the fix can be pretty straight forward. I wouldn't mind doing it > for you.
I am planning on dropping the plan-before-test requirement as well as adding a "until I say I'm done" plan, but it'll probably have to wait for Test::Builder 2. PS Are you aware of the "no_plan" plan? -- But there's no sense crying over every mistake. You just keep on trying till you run out of cake. -- Jonathan Coulton, "Still Alive"
The restriction on having to have a plan declared before running a test has been lifted as part of implementing done_testing(). You can now declare the plan at the end. There's no exposed way of changing the plan once its been declared, but that's another show. This version hasn't been released, but you can get a copy from the repository. http://github.com/schwern/test-more/tree/master