NAME

Test::TAP - Test your TAP

VERSION

Version 0.03

SYNOPSIS

 use Test::TAP;

 is_passing_tap $tap1, 'TAP tests passed';
 is_failing_tap $tap2, 'TAP tests failed';

EXPORT

  • is_passing_tap

  • is_failing_tap

DESCRIPTION

Experimental module to tell if a TAP document is 'passing' or 'failing'. We'll add more later, but for the time being, this module is for TAP developers to experiment with.

TESTS

is_passing_tap

 is_passing_tap <<'END_TAP', '... TAP tests passed';
 1..1
 ok 1 This test passed
 END_TAP

Test passes if the string passed if the following criteria are met:

  • One plan

    You must have one and only one plan. It may be at the beginning or end of the TAP, but not embedded. Plans found in nested TAP are acceptable.

  • Correct plan.

    Number of tests run must match the plan.

  • No failing tests.

    No 'not ok' tests may be found unless they are TODO tests.

is_failing_tap

 is_failing_tap <<'END_TAP', '... TAP tests passed';
 1..1
 not ok 1 This test passed
 END_TAP

AUTHOR

Curtis "Ovid" Poe, <ovid@cpan.org>

BUGS

Please report any bugs or feature requests to bug-test-tap@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-TAP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SEE ALSO

Test::Simple, TAP::Harness

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 Curtis "Ovid" Poe, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.