Hi all, 
 
The next version of my TAP parser is at 
http://users.easystreet.com/ovid/downloads/TAPx-Parser-0.02.tar.gz  

It's still not complete, but it's a lot further along than it was.  Some notes 
from Changes:

  0.02    8 June, 2006
        - Moved some lexer responsibility to the parser.  This will allow us
          to eventually parse streams.
        - Properly track passed/failed tests, even accounting for TODO.
        - Added support for comments and unknown lines.
        - Allow explicit and inferred test numbers to be mixed.
        - Allow escaped hashe marks in the test description.
        - Renamed to TAPx::Parser.  Will probably rename it again.

Note that it does not yet handle streams, but that's kind of low on my list 
right now (though it is on my list).

Just to give you an idea of what it can do, for this test:

  ok 1 - input file opened

We get this:

  my $test = shift @results;
  isa_ok $test, $TEST;
  ok $test->is_test,     '... and it should identify itself as a test';
  is $test->ok,          'ok', '... and it should have the correct ok()';
  ok $test->is_ok,       '... and the correct boolean version of ok()';
  is $test->number,      1, '... and have the correct test number';
  is $test->description, '- input file opened',
    '... and the correct description';
  ok !$test->directive,   '... and not have a directive';
  ok !$test->explanation, '... or a directive explanation';
  ok !$test->is_skip,     '... and it is not a SKIPped test';
  ok !$test->is_todo,     '... nor a TODO test';
  is $test->as_string, 'ok 1 - input file opened',
    '... and its string representation should be correct';

There are still some bugs, but it's definitely getting there.

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