----- Original Message ----
From: Shlomi Fish <[EMAIL PROTECTED]>

> "t/sample-tests/todo" in the Test-Harness distribution reads:
>
> <<<<<<<<<<<
> print <<DUMMY_TEST;
> 1..5 todo 3   2;
> ok 1
> ok 2
> not ok 3
> ok 4
> ok 5
> DUMMY_TEST
> >>>>>>>>>>>
>
> As one can see, the "1..5" plan is followed by the "todo 3  2;" directive.
> This is supposed to indicate something about plan ahead todo tests. (Instead
> of the "# TODO" directives in the individual tests' outputs. Now:
>
> 1. t/sample-tests/todo is being run by Test-Harness, which seems to think
> the "not ok 3" is a todo test.
>
> 2. This todo-enabled plan is not documented in:
>
> http://search.cpan.org/~petdance/Test-Harness/lib/Test/Harness/TAP.pod
>
> 3. TAPx-Parser version 0.20 cannot handle it.
>
> --------------
>
> I'd like to know what I should do about this feature, because right now I'm
> trying to convert Test-Run to use TAPX::Harness, and this is giving me
> problems.

Hmm, that's curious. However, if it's undocumented I would argue against 
supporting it right now.  What benefit does it gain us?

It also makes the grammar a tad more complicated (though not overly so).  This 
no longer works:

 tap    ::= plan tests | tests plan  
 plan   ::= '1..' positiveInteger "\n"Instead we'd have to do this:

  tap         ::= plan todoList "\n" tests | tests plan "\n"?
  plan       ::= '1..'   positiveInteger
  todoList ::= 'todo ' positiveInteger { ' ' positiveInteger }

We can only allow the todoList on a leading plan because one on a trailing plan 
means we can't know the test results until the test run has completed (which 
would suck in the case of infinite streams).

However, even allowing this on a leading plan is still problematic because 
either the programmer needs to know the test numbers in advance to add that 
list or the code somehow would need to deduce them.  Then, we'd have to started 
defining the semantics of what happens if we have that leading todoList in case 
of one of those tests having a SKIP or TODO directive.  I'm guessing that means 
that leading todoList test numbers would be ignored in that case?  I would 
suggest that this is not a feature we want unless we can nail down its intent 
and semantics quite carefully.

Does anyone know the rational behind it?

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