1Test::Stream::Event::OkU(s3e)r Contributed Perl DocumentaTteisotn::Stream::Event::Ok(3)
2
3
4

NAME

6       Test::Stream::Event::Ok - Ok event type
7

DEPRECATED

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

DESCRIPTION

15       Ok events are generated whenever you run a test that produces a result.
16       Examples are ok(), and is().
17

SYNOPSIS

19           use Test::Stream::Context qw/context/;
20           use Test::Stream::Event::Ok;
21
22           my $ctx = context();
23           my $event = $ctx->ok($bool, $name, \@diag);
24
25       or:
26
27           my $ctx   = debug();
28           my $event = $ctx->send_event(
29               'Ok',
30               pass => $bool,
31               name => $name,
32               diag => \@diag
33           );
34

ACCESSORS

36       $rb = $e->pass
37           The original true/false value of whatever was passed into the event
38           (but reduced down to 1 or 0).
39
40       $name = $e->name
41           Name of the test.
42
43       $diag = $e->diag
44           An arrayref full of diagnostics strings to print in the event of a
45           failure.
46
47           Note: This does not have anything by default, the default_diag()
48           method can be used to generate the basic diagnostics message which
49           you may push into this arrayref.
50
51       $b = $e->effective_pass
52           This is the true/false value of the test after TODO, SKIP, and
53           similar modifiers are taken into account.
54
55       $b = $e->allow_bad_name
56           This relaxes the test name checks such that they allow characters
57           that can confuse a TAP parser.
58

METHODS

60       $string = $e->default_diag()
61           This generates the default diagnostics string:
62
63               # Failed test 'Some Test'
64               # at t/foo.t line 42.
65
66       @sets = $e->to_tap()
67       @sets = $e->to_tap($num)
68           Generate the tap stream for this object. @sets containes 1 or more
69           arrayrefs that identify the IO handle to use, and the string that
70           should be sent to it.
71
72           IO Handle identifiers are set to the value of the
73           Test::Stream::Formatter::TAP "OUT_*" constants.
74
75           Example:
76
77               @sets = (
78                   [OUT_STD() => 'not ok 1 - foo'],
79                   [OUT_ERR() => '# Test 1 Failed ...' ],
80                   ...
81               );
82

SOURCE

84       The source code repository for Test::Stream can be found at
85       http://github.com/Test-More/Test-Stream/.
86

MAINTAINERS

88       Chad Granum <exodist@cpan.org>
89

AUTHORS

91       Chad Granum <exodist@cpan.org>
92
94       Copyright 2015 Chad Granum <exodist7@gmail.com>.
95
96       This program is free software; you can redistribute it and/or modify it
97       under the same terms as Perl itself.
98
99       See http://dev.perl.org/licenses/
100
101
102
103perl v5.36.0                      2023-01-20        Test::Stream::Event::Ok(3)
Impressum