File: //usr/local/share/man/man3/Test::Alien::Run.3pm
.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35)
.\"
.\" 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 "Test::Alien::Run 3"
.TH Test::Alien::Run 3 "2021-10-28" "perl v5.26.3" "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"
Test::Alien::Run \- Run object
.SH "VERSION"
.IX Header "VERSION"
version 2.45
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 2
\& use Test2::V0;
\& use Test::Alien;
\&
\& run_ok([ $^X, \-e => \*(Aqprint "some output"; exit 22\*(Aq])
\& \->exit_is(22)
\& \->out_like(qr{some});
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
This class stores information about a process run as performed by
Test::Alien#run_ok. That function is the \fI\s-1ONLY\s0\fR way to create
an instance of this class.
.SH "ATTRIBUTES"
.IX Header "ATTRIBUTES"
.SS "out"
.IX Subsection "out"
.Vb 1
\& my $str = $run\->out;
.Ve
.PP
The standard output from the run.
.SS "err"
.IX Subsection "err"
.Vb 1
\& my $str = $run\->err;
.Ve
.PP
The standard error from the run.
.SS "exit"
.IX Subsection "exit"
.Vb 1
\& my $int = $run\->exit;
.Ve
.PP
The exit value of the run.
.SS "signal"
.IX Subsection "signal"
.Vb 1
\& my $int = $run\->signal;
.Ve
.PP
The signal that killed the run, or zero if the process was terminated normally.
.SH "METHODS"
.IX Header "METHODS"
These methods return the run object itself, so they can be chained,
as in the synopsis above.
.SS "success"
.IX Subsection "success"
.Vb 2
\& $run\->success;
\& $run\->success($message);
.Ve
.PP
Passes if the process terminated normally with an exit value of 0.
.SS "exit_is"
.IX Subsection "exit_is"
.Vb 2
\& $run\->exit_is($exit);
\& $run\->exit_is($exit, $message);
.Ve
.PP
Passes if the process terminated with the given exit value.
.SS "exit_isnt"
.IX Subsection "exit_isnt"
.Vb 2
\& $run\->exit_isnt($exit);
\& $run\->exit_isnt($exit, $message);
.Ve
.PP
Passes if the process terminated with an exit value of anything
but the given value.
.SS "out_like"
.IX Subsection "out_like"
.Vb 2
\& $run\->out_like($regex);
\& $run\->out_like($regex, $message);
.Ve
.PP
Passes if the output of the run matches the given pattern.
.SS "out_unlike"
.IX Subsection "out_unlike"
.Vb 2
\& $run\->out_unlike($regex);
\& $run\->out_unlike($regex, $message);
.Ve
.PP
Passes if the output of the run does not match the given pattern.
.SS "err_like"
.IX Subsection "err_like"
.Vb 2
\& $run\->err_like($regex);
\& $run\->err_like($regex, $message);
.Ve
.PP
Passes if the standard error of the run matches the given pattern.
.SS "err_unlike"
.IX Subsection "err_unlike"
.Vb 2
\& $run\->err_unlike($regex);
\& $run\->err_unlike($regex, $message);
.Ve
.PP
Passes if the standard error of the run does not match the given pattern.
.SS "note"
.IX Subsection "note"
.Vb 1
\& $run\->note;
.Ve
.PP
Send the output and standard error as test note.
.SS "diag"
.IX Subsection "diag"
.Vb 1
\& $run\->diag;
.Ve
.PP
Send the output and standard error as test diagnostic.
.SH "SEE ALSO"
.IX Header "SEE ALSO"
.IP "Test::Alien" 4
.IX Item "Test::Alien"
.SH "AUTHOR"
.IX Header "AUTHOR"
Author: Graham Ollis <plicease@cpan.org>
.PP
Contributors:
.PP
Diab Jerius (\s-1DJERIUS\s0)
.PP
Roy Storey (\s-1KIWIROY\s0)
.PP
Ilya Pavlov
.PP
David Mertens (run4flat)
.PP
Mark Nunberg (mordy, mnunberg)
.PP
Christian Walde (Mithaldu)
.PP
Brian Wightman (MidLifeXis)
.PP
Zaki Mughal (zmughal)
.PP
mohawk (mohawk2, \s-1ETJ\s0)
.PP
Vikas N Kumar (vikasnkumar)
.PP
Flavio Poletti (polettix)
.PP
Salvador Fandiño (salva)
.PP
Gianni Ceccarelli (dakkar)
.PP
Pavel Shaydo (zwon, trinitum)
.PP
Kang-min Liu (劉康民, gugod)
.PP
Nicholas Shipp (nshp)
.PP
Juan Julián Merelo Guervós (\s-1JJ\s0)
.PP
Joel Berger (\s-1JBERGER\s0)
.PP
Petr Písař (ppisar)
.PP
Lance Wicks (\s-1LANCEW\s0)
.PP
Ahmad Fatoum (a3f, \s-1ATHREEF\s0)
.PP
José Joaquín Atria (\s-1JJATRIA\s0)
.PP
Duke Leto (\s-1LETO\s0)
.PP
Shoichi Kaji (\s-1SKAJI\s0)
.PP
Shawn Laffan (\s-1SLAFFAN\s0)
.PP
Paul Evans (leonerd, \s-1PEVANS\s0)
.PP
Håkon Hægland (hakonhagland, \s-1HAKONH\s0)
.PP
nick nauwelaerts (\s-1INPHOBIA\s0)
.SH "COPYRIGHT AND LICENSE"
.IX Header "COPYRIGHT AND LICENSE"
This software is copyright (c) 2011\-2020 by Graham Ollis.
.PP
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.