--- Adrian Howard <[EMAIL PROTECTED]> wrote:

> > Minimum required:
> >
> >   wanted
> >   found
> >   line
> >   file
> >   description
> 
> I'm uncomfortable with any "minimum" to be honest. I'd be happier  
> with "recommended".
> 
> For example I write customer-facing tests that read like  
> is_member_status_pending_after_failed_registration() that just return
>  
> boolean results (and some useful diagnostic text) - does having  
> "wanted: true, found: false" help for these?
> 
> Do line numbers and files make sense when I'm generating my tests  
> from a bunch 'o' spreadsheets?
> 
> Since TAP currently allows empty descriptions - does it make sense to
>  
> force a
> 
>       description: ''
> 
> line out?

After doing a bit of thinking about this and chatting with Andy
Armstrong about this, I've realized that much of the current thought
about the TAP diagnostics is wrong.  We already have much of what we
want in the TAP line above the diagnostics so there's no need to be
redundant.  The "description:" key is gone.

In fact, there will be no mandatory keys.  So for a test like this:

  ok $foo, '... my toe hurts';

We might see the following TAP:

  not ok 42 ... my toe hurts
      ---
      line: 53
      file: t/23-body-parts.t
      ...

But for this:

  is $elbow, $hole_in_the_ground;
  
You might get this TAP:

  not ok 12
      ---
      line: 15
      file: t/23-body-parts.t
      wanted: elbow
      found: moron
      ...

Because the current behavior of Test::Harness is to discard "unknown"
lines (except when verbose), you won't even see the YAML.

Cheers,
Ovid

--
Buy the book  - http://www.oreilly.com/catalog/perlhks/
Perl and CGI  - http://users.easystreet.com/ovid/cgi_course/
Personal blog - http://publius-ovidius.livejournal.com/
Tech blog     - http://use.perl.org/~Ovid/journal/

Reply via email to