.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test2::Harness::Collector::TapParser 3pm" .TH Test2::Harness::Collector::TapParser 3pm "2023-03-12" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Test2::Harness::Collector::TapParser \- Produce EventFacets from a line of TAP. .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is responsible for reading and processing any \s-1TAP\s0 output from tests. Lines of \s-1TAP\s0 output are processed into Test2::Event facet data. Note that \f(CW\*(C`Test2 \-> TAP \-> Test2\*(C'\fR is lossy at the \f(CW\*(C`Test2 \-> TAP\*(C'\fR step. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Test2::Harness::Collector::TapParser qw/parse_tap_line/; \& \& my $facet_data = parse_tap_line("1..1"); \& is( \& $facet_data, \& { \& trace => {nested => 0}, \& hubs => [{nested => 0}], \& plan => { \& details => \*(Aq\*(Aq, \& count => 1, \& skip => 0, \& }, \& }, \& "Parsed the plan" \& ); \& \& $facet_data = parse_tap_line("# foo"); \& is( \& $facet_data, \& { \& trace => { nested => 0 }, \& hubs => [ { nested => 0 } ], \& info => [ \& { \& tag => \*(AqNOTE\*(Aq, \& details => \*(Aqfoo\*(Aq, \& debug => 0, \& }, \& ], \& }, \& \& "Parsed the note" \& ); \& \& $facet_data = parse_tap_line("ok 1"); \& is( \& $facet_data, \& { \& trace => {nested => 0}, \& hubs => [{nested => 0}], \& assert => { \& no_debug => 1, \& pass => 1, \& number => \*(Aq1\*(Aq, \& details => \*(Aq\*(Aq, \& }, \& }, \& "Parsed the assertion" \& ); .Ve .SH "EXPORTS" .IX Header "EXPORTS" .ie n .IP "$facet_data = parse_tap_line($line)" 4 .el .IP "\f(CW$facet_data\fR = parse_tap_line($line)" 4 .IX Item "$facet_data = parse_tap_line($line)" Parse a line of \s-1TAP.\s0 It is assumed to be \s-1STDOUT\s0 thus all comments are turned into notes. Using this export will \fB\s-1NOT\s0\fR add the usual \f(CW\*(C`from_tap\*(C'\fR facet. It is better to use one of the other 2 exports. .ie n .IP "$facet_data = parse_stdout_tap($line)" 4 .el .IP "\f(CW$facet_data\fR = parse_stdout_tap($line)" 4 .IX Item "$facet_data = parse_stdout_tap($line)" Parse a line of \s-1TAP\s0 from stdout. .ie n .IP "$facet_data = parse_stderr_tap($line)" 4 .el .IP "\f(CW$facet_data\fR = parse_stderr_tap($line)" 4 .IX Item "$facet_data = parse_stderr_tap($line)" Parse a line of \s-1TAP\s0 from stderr. This will \fB\s-1ONLY\s0\fR parse comment lines (ones that start with a \f(CW\*(C`#\*(C'\fR, which may be indented). All comments will be treated as diag's, all other lines will be ignored. .SH "SOURCE" .IX Header "SOURCE" The source code repository for Test2\-Harness can be found at \&\fIhttp://github.com/Test\-More/Test2\-Harness/\fR. .SH "MAINTAINERS" .IX Header "MAINTAINERS" .IP "Chad Granum " 4 .IX Item "Chad Granum " .SH "AUTHORS" .IX Header "AUTHORS" .PD 0 .IP "Chad Granum " 4 .IX Item "Chad Granum " .PD .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2020 Chad Granum . .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See \fIhttp://dev.perl.org/licenses/\fR