Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday July 04, 2006
02:25 PM

TAP::Parser 0.01 (alpha)

[ #30170 ]

Because I'll be gone a couple of days, I wanted to get a quick alpha of the TAP parser out there. It has no docs.

Here's how you use it (or you could look at the tests):

  my $parser = TAP::Parser->new;

  $parser->parse($tap); # croaks on bad TAP

  print $parser->plan;
  while ( my $test = $parser->tests ) {
      print $test->as_string;
      # or
      print $test->is_ok;        # boolean value
      print $test->ok;           # 'not ok' or 'ok'
      print $test->number;
      print $test->description;
      print $test->directive;    # TODO or SKIP data
  }

You can download it from my Website.

It'd be awfully swell if you can feed it a bunch of TAP output so I can see what if fails on. Kibitzing is also encouraged, though I warn you that the thing was thrown together rather hastily.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Is this designed to target a similar niche to Test::TAP::Model and co?

    By the way, I think Test::TAP::Parser would be "better" on the basis that, a) I dislike the name TAP, b) because it's ungooglable, and testing newbies (i.e. the ones who really don't need any barrier to testing) are going to find it easier to search cpan under Test as opposed to TAP, and c) there's already prior art under Test::TAP as above.
    --

    osfameron

    • I have no control over the name "TAP", so that part will not change. Also, even though it looks like it belongs under the Test:: namespace, it don't think it does, though I'm not too worried about it. TAP::Parser has nothing to do with tests. All it does is parse the TAP protocol [cpan.org] and gives you an OO interface for examining results. If something doesn't parse, it throws an exception with a clear message as to why (though I should probably push errors onto a stack and report all of them at once).

      Since i

      • Oh, sure, pet peeve aside, I agree that the TAP "brand" is a good idea and should be part of the module name, sorry to overstate the case! It looks like it could become a useful part of a testing infrastructure toolkit.

        Searching CPAN for TAP [cpan.org] only comes up with TAP.pm though (a documentation-only package describing the protocol) in the top-level namespace. Or am I missing something?

        --

        osfameron