----- Original Message ---- 
From: Adam Kennedy  
 
> Whoa whoa whoa slow down there folks... 
> 
> Some people seemed to have misrecognised those keys as YAML. 
> 
> It was NEVER meant to be YAML. 
> 
> The idea was to use something more like MIME headers. 
 
Well, regardless of what those lines are, we might have to come up with a 
language agnostic implementation if we really care about what we're going to do 
with that data other than spit it out the whole chunk of it.  If all that's 
intended is to show a pop-up of the failure after clicking on a "See Details" 
button, then parsing it isn't necessary and I, for one, am not keen on writing 
one parser for TAP and having a separate parser for the details. 
 
My vote: 

  not ok 2 - omg t3h sooper test!!1! 
  > { any: 
  >         junk, 
  >     you: 
  >         want. 
  >    TADA! } 
 
I don't care *what* is on the right side of the "> " (greater than, space).  
Any TAP parser shouldn't care, either.  It merely knows that this is failure 
information associated with the previous test.  If someone wants to write a 
custom handler which handles their language's flavor of got/expected (I agree 
that "got" is terrible), then let them parse that for their little "See 
Details" GUI pop-up box.

So in the parser:

  while ( my $chunk = $tap_stream->() ) {
    $parser->parse_stream( $chunk );
  }
  $parser->finalize;

  foreach my $result ( $parser->results ) {
    if ( $result->is_test && $result->failed ) {
      my_parser( $result->diagnostics );  # whee!  We don't care what it does
    }
    else { ... }
  }
  
Cheers,
Ovid

-- If this message is a response to a question on a mailing list, please send 
follow up questions to the list. 
  
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/ 


Reply via email to