++ed by:

2 non-PAUSE users.

Chad Granum


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


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


This will parse streaming subtests and turn them into events, however it may not report the proper nesting of the subtests. Streaming subtest nesting is reconstructed once the subtest finishes. 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
        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 event before processing the next line. The event is first sent to the renderer as an orphan, the render can choose to display it, erase it or ignore it. Once the outer-most subtest ends the job is able to determine the correct nesting and sends a Test2::Event::Subtest containing the full nested subtest structure reconstructed. This allows a render to display a progress indicator that updates for all events generated inside the subtest, which it can then replace with the full subtest rendered at the end.


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


Chad Granum <exodist@cpan.org>


Chad Granum <exodist@cpan.org>


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/