--- Eric  Hacker <[EMAIL PROTECTED]> wrote:

> > Given all of this chat, what would folks think about an optional
> switch
> > to 'runtests' (the TAPx::Parser equivalent to 'prove'), which would
> > warn users about which test programs are being run without a plan?

That should have read 'run with a trailing plan' because 'no plan' is a
parse failure.  A trailing plan generally means the plan is computed
from the number of tests run.
 
> Brilliant idea.
> 
> In functional testing, there are situations where one doesn't know
> how
> many tests will be run. Say I am testing a web site to make sure that
> the copyright is included on every page.
> I don't want a plan, I just want to know if any pages fail (and which
> ones).
> 
> How is this handled with pod checking?

The various Test::POD modules generate a plan for you, though you can
override this, if needed.

> I think making it possible for the lack of a plan to be flagged when
> it is important retains Perl's inherent flexibility while supporting
> correctness when necessary.

I think it would be useful to have another switch which would simply
warn about things which aren't, strictly speaking, errors, but which
the developer might want to know about:

* Trailing plan
* Non-TAP output (currently legal but discarded for 
  forward-compatibility reasons)
* ???

I have no idea what to name that switch, though, as 'warnings' is
already taken to enable warnings in the programs.  '--tap-warnings' is
probably a decent choice even though I prefer '--squeal-like-a-pig'.

(Well, -w and -W are taken, '--warnings' is not, but '--warnings' seems
like it would be too confusing)

Cheers,
Ovid

--

Buy the book -- http://www.oreilly.com/catalog/perlhks/
Perl and CGI -- http://users.easystreet.com/ovid/cgi_course/

Reply via email to