# from Geoffrey Young
# on Tuesday 15 January 2008 11:49:

>what I think many are asking for is for Test::Builder to be able to
>issue the appropriate TAP on $condition.

Where $condition is a run-time option set at the command-line, not 
hardcoded into the test.

Writing "or BAIL_OUT(...)" in the test is a different thing than 
saying "I'm going to start a test run, but I want it to bail if 
anything fails".

The former is in effect for both the developer and the end-user/ 
installer.  One typically wants a full report from an end-user, so you 
don't want to ship it with bail everywhere.  This is not a command-line 
conditional bail, but rather "the module won't even load for some 
reason and thus testing anything else is pointless".

The latter is for developer convenience while adding some tests or 
changing some code.  The error is often an obvious typo or something 
that can be fixed with only the data from the first fail.  This is not 
really a "bail out" so much as a "ok, I get it.  Everything should stop 
now."

>what I hear people saying is 
>that, no matter what $condition, this is a bad idea for Test::Builder.
>I don't get this at all - why is it a bad idea to make T::B issue
> valid TAP on demand?

Because the use-case applies to situations where the tap producer is not 
Test::Builder.  It is a harness feature, so should go in the harness.

--Eric
-- 
If the collapse of the Berlin Wall had taught us anything, it was that
socialism alone was not a sustainable economic model.
--Robert Young
---------------------------------------------------
    http://scratchcomputing.com
---------------------------------------------------

Reply via email to