Debian Codegraph @

upstream/opensuse-tumbleweed/man3/TAP::Formatter::Base.3pm

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\"
56 .\" Required to disable full justification in groff 1.23.0.
57 .if n .ds AD l
58 .\" ========================================================================
59 .\"
60 .IX Title "TAP::Formatter::Base 3pm"
61 .TH TAP::Formatter::Base 3pm 2026-03-09 "perl v5.42.1" "Perl Programmers Reference Guide"
62 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
63 .\" way too many mistakes in technical documents.
64 .if n .ad l
65 .nh
66 .SH NAME
67 TAP::Formatter::Base \- Base class for harness output delegates
68 .SH VERSION
69 .IX Header "VERSION"
70 Version 3.50
71 .SH DESCRIPTION
72 .IX Header "DESCRIPTION"
73 This provides console orientated output formatting for TAP::Harness.
74 .SH SYNOPSIS
75 .IX Header "SYNOPSIS"
76 .Vb 2
77 \& use TAP::Formatter::Console;
78 \& my $harness = TAP::Formatter::Console\->new( \e%args );
79 .Ve
80 .SH METHODS
81 .IX Header "METHODS"
82 .SS "Class Methods"
83 .IX Subsection "Class Methods"
84 \fR\f(CI\*(C`new\*(C'\fR\fI\fR
85 .IX Subsection "new"
86 .PP
87 .Vb 4
88 \& my %args = (
89 \& verbose => 1,
90 \& )
91 \& my $harness = TAP::Formatter::Console\->new( \e%args );
92 .Ve
93 .PP
94 The constructor returns a new \f(CW\*(C`TAP::Formatter::Console\*(C'\fR object. If
95 a TAP::Harness is created with no \f(CW\*(C`formatter\*(C'\fR a
96 \&\f(CW\*(C`TAP::Formatter::Console\*(C'\fR is automatically created. If any of the
97 following options were given to TAP::Harness\->new they well be passed to
98 this constructor which accepts an optional hashref whose allowed keys are:
99 .IP \(bu 4
100 \&\f(CW\*(C`verbosity\*(C'\fR
101 .Sp
102 Set the verbosity level.
103 .IP \(bu 4
104 \&\f(CW\*(C`verbose\*(C'\fR
105 .Sp
106 Printing individual test results to STDOUT.
107 .IP \(bu 4
108 \&\f(CW\*(C`timer\*(C'\fR
109 .Sp
110 Append run time for each test to output. Uses Time::HiRes if available.
111 .IP \(bu 4
112 \&\f(CW\*(C`failures\*(C'\fR
113 .Sp
114 Show test failures (this is a no\-op if \f(CW\*(C`verbose\*(C'\fR is selected).
115 .IP \(bu 4
116 \&\f(CW\*(C`comments\*(C'\fR
117 .Sp
118 Show test comments (this is a no\-op if \f(CW\*(C`verbose\*(C'\fR is selected).
119 .IP \(bu 4
120 \&\f(CW\*(C`quiet\*(C'\fR
121 .Sp
122 Suppressing some test output (mostly failures while tests are running).
123 .IP \(bu 4
124 \&\f(CW\*(C`really_quiet\*(C'\fR
125 .Sp
126 Suppressing everything but the tests summary.
127 .IP \(bu 4
128 \&\f(CW\*(C`silent\*(C'\fR
129 .Sp
130 Suppressing all output.
131 .IP \(bu 4
132 \&\f(CW\*(C`errors\*(C'\fR
133 .Sp
134 If parse errors are found in the TAP output, a note of this will be made
135 in the summary report. To see all of the parse errors, set this argument to
136 true:
137 .Sp
138 .Vb 1
139 \& errors => 1
140 .Ve
141 .IP \(bu 4
142 \&\f(CW\*(C`directives\*(C'\fR
143 .Sp
144 If set to a true value, only test results with directives will be displayed.
145 This overrides other settings such as \f(CW\*(C`verbose\*(C'\fR, \f(CW\*(C`failures\*(C'\fR, or \f(CW\*(C`comments\*(C'\fR.
146 .IP \(bu 4
147 \&\f(CW\*(C`stdout\*(C'\fR
148 .Sp
149 A filehandle for catching standard output.
150 .IP \(bu 4
151 \&\f(CW\*(C`color\*(C'\fR
152 .Sp
153 If defined specifies whether color output is desired. If \f(CW\*(C`color\*(C'\fR is not
154 defined it will default to color output if color support is available on
155 the current platform and output is not being redirected.
156 .IP \(bu 4
157 \&\f(CW\*(C`jobs\*(C'\fR
158 .Sp
159 The number of concurrent jobs this formatter will handle.
160 .IP \(bu 4
161 \&\f(CW\*(C`show_count\*(C'\fR
162 .Sp
163 Boolean value. If false, disables the \f(CW\*(C`X/Y\*(C'\fR test count which shows up while
164 tests are running.
165 .PP
166 Any keys for which the value is \f(CW\*(C`undef\*(C'\fR will be ignored.
167 .PP
168 \fR\f(CI\*(C`prepare\*(C'\fR\fI\fR
169 .IX Subsection "prepare"
170 .PP
171 Called by Test::Harness before any test output is generated.
172 .PP
173 This is an advisory and may not be called in the case where tests are
174 being supplied to Test::Harness by an iterator.
175 .PP
176 \fR\f(CI\*(C`open_test\*(C'\fR\fI\fR
177 .IX Subsection "open_test"
178 .PP
179 Called to create a new test session. A test session looks like this:
180 .PP
181 .Vb 6
182 \& my $session = $formatter\->open_test( $test, $parser );
183 \& while ( defined( my $result = $parser\->next ) ) {
184 \& $session\->result($result);
185 \& exit 1 if $result\->is_bailout;
186 \& }
187 \& $session\->close_test;
188 .Ve
189 .PP
190 \fR\f(CI\*(C`summary\*(C'\fR\fI\fR
191 .IX Subsection "summary"
192 .PP
193 .Vb 1
194 \& $harness\->summary( $aggregate );
195 .Ve
196 .PP
197 \&\f(CW\*(C`summary\*(C'\fR prints the summary report after all tests are run. The first
198 argument is an aggregate to summarise. An optional second argument may
199 be set to a true value to indicate that the summary is being output as a
200 result of an interrupted test run.