1Test::Stream::FormatterU:s:eTrAPC(o3n)tributed Perl DocuTmeesntt:a:tSitorneam::Formatter::TAP(3)
2
3
4
6 Test::Stream::Formatter::TAP - Standard TAP formatter
7
9 This distribution is deprecated in favor of Test2, Test2::Suite, and
10 Test2::Workflow.
11
12 See Test::Stream::Manual::ToTest2 for a conversion guide.
13
15 This is what takes events and turns them into TAP.
16
18 use Test::Stream::Formatter::TAP;
19 my $tap = Test::Stream::Formatter::TAP->new();
20
21 # Switch to utf8
22 $tap->encoding('utf8');
23
24 $tap->write($event, $number); # Output an event
25
27 OUT_STD
28 OUT_ERR
29 OUT_TODO
30 These are constants to identify filehandles. These constants are
31 used by events to direct text to the correct filehandle.
32
34 $bool = $tap->no_numbers
35 $tap->set_no_numbers($bool)
36 Use to turn numbers on and off.
37
38 $bool = $tap->no_header($bool)
39 $tap->set_no_header($bool)
40 When true, the plan will not be rendered.
41
42 $bool = $tap->no_diag
43 $tap->set_no_diag($bool)
44 When true, diagnostics will not be rendered.
45
46 $arrayref = $tap->handles
47 $tap->set_handles(\@handles);
48 Can be used to get/set the filehandles. Indexes are identified by
49 the "OUT_STD, OUT_ERR, OUT_TODO" constants.
50
51 $encoding = $tap->encoding
52 $tap->encoding($encoding)
53 Get or set the encoding. By default no encoding is set, the
54 original settings of STDOUT and STDERR are used.
55
56 This directly modifies the stored filehandles, it does not create
57 new ones.
58
59 $tap->write($e, $num)
60 Write an event to the console.
61
63 The source code repository for Test::Stream can be found at
64 http://github.com/Test-More/Test-Stream/.
65
67 Chad Granum <exodist@cpan.org>
68
70 Chad Granum <exodist@cpan.org>
71 Kent Fredric <kentnl@cpan.org>
72
74 Copyright 2015 Chad Granum <exodist7@gmail.com>.
75
76 This program is free software; you can redistribute it and/or modify it
77 under the same terms as Perl itself.
78
79 See http://dev.perl.org/licenses/
80
81
82
83perl v5.32.1 2021-01-27 Test::Stream::Formatter::TAP(3)