The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Test2::Harness::Parser::TAP - The TAP stream parser.

DESCRIPTION

This parser reads a TAP stream and converts it into Test2::Harness::Fact objects. This parser can parse regular subtests as well as the new style buffered subtests.

IMPORTANT NOTE ON SUBTEST PARSING

This will parse subtests and turn them into facts, however it may not report the proper nesting of the subtests. Subtest nesting is reconstructed by the Test2::Harness::Job object. This is important because the parser cannot be sure of nesting until the outer-most subtest has completed. Example:

            ok 1 - I am nested, but how deep?
                ok 1 - I am nested, but how deep?
            ok 2
            1..2
        ok 1 - That subtest ended
    ok 1 - Outer subtest ended

Looking at this a human can say "Oh, each subtest has a 4 space indentation" but the parser has to read it 1 line at a time, and sends each line as a fact before processing the next line. The fact is first sent to the renderer as an orphan, the render can choose to displayit, erase it or ignore it. Once the outer-most subtest ends the job is able to determine the correct nesting and sends a fact containing an Test2::Harness::Result object with the full nested subtest structure reconstructed. This allows a render to display a progress indicator that updates for all facts generated inside the subtest, which it can then replace with the full subtest rendered at the end.

SOURCE

The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT

Copyright 2016 Chad Granum <exodist7@gmail.com>.

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

See http://dev.perl.org/licenses/