NAME
metatap - Create TAP about TAP
DESCRIPTION
metatap is a simple testing tool for TAP producers. It reads TAP from standard input, along with the expected results on the command line. It then produces (and optionally runs) TAP describing how the input TAP was interpreted by TAP::Harness.
For example, if you send to following TAP:
1..5
ok 1 - 1 equals 1
ok 2 - 1 equals 1
ok 3 # skip because
not ok 4 - 1 equals 2
ok 5 - 1 == 2 # TODO because
into
$ metatap --planned=5 --ok=2 --failed=1 --skip=1 --todo=0
it will produce the following (TAP) output:
1..6
ok 1 - Expected number of passed tests (excluding skip and toto tests) == 2
ok 2 - Expected number of planned tests == 5
ok 3 # skip Expected number of passed tests (including skip and toto tests) not specified
ok 4 - Expected number of failed tests == 1
not ok 5 - Expected number of todo tests == 0
ok 6 - Expected number of skipped tests == 1
adding the --runtests option, the produced TAP will be run in a TAP::Harness, yielding:
TAP .. Failed 1/6 subtests
(less 1 skipped subtest: 4 okay)
Test Summary Report
-------------------
TAP (Wstat: 0 Tests: 6 Failed: 1)
Failed test: 5
Files=1, Tests=6, 0 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)
Result: FAIL
SEE ALSO
AUTHOR
Patrick LeBoutillier <patl@cpan.org> is the author of metatap.
COPYRIGHT
Copyright (c) 2010-2011, Patrick LeBoutillier.
All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License. See http://www.perl.com/perl/misc/Artistic.html for more details.