Gestionnaire de fichiers - Editer - /usr/local/share/man/man3/App::Prove.3pm
Arrière
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" 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 turned on, 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 .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "App::Prove 3" .TH App::Prove 3 "2018-03-19" "perl v5.16.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" App::Prove \- Implements the "prove" command. .SH "VERSION" .IX Header "VERSION" Version 3.42 .SH "DESCRIPTION" .IX Header "DESCRIPTION" Test::Harness provides a command, \f(CW\*(C`prove\*(C'\fR, which runs a \s-1TAP\s0 based test suite and prints a report. The \f(CW\*(C`prove\*(C'\fR command is a minimal wrapper around an instance of this module. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use App::Prove; \& \& my $app = App::Prove\->new; \& $app\->process_args(@ARGV); \& $app\->run; .Ve .SH "METHODS" .IX Header "METHODS" .SS "Class Methods" .IX Subsection "Class Methods" \fI\f(CI\*(C`new\*(C'\fI\fR .IX Subsection "new" .PP Create a new \f(CW\*(C`App::Prove\*(C'\fR. Optionally a hash ref of attribute initializers may be passed. .PP \fI\f(CI\*(C`state_class\*(C'\fI\fR .IX Subsection "state_class" .PP Getter/setter for the name of the class used for maintaining state. This class should either subclass from \f(CW\*(C`App::Prove::State\*(C'\fR or provide an identical interface. .PP \fI\f(CI\*(C`state_manager\*(C'\fI\fR .IX Subsection "state_manager" .PP Getter/setter for the instance of the \f(CW\*(C`state_class\*(C'\fR. .PP \fI\f(CI\*(C`add_rc_file\*(C'\fI\fR .IX Subsection "add_rc_file" .PP .Vb 1 \& $prove\->add_rc_file(\*(Aqmyproj/.proverc\*(Aq); .Ve .PP Called before \f(CW\*(C`process_args\*(C'\fR to prepend the contents of an rc file to the options. .PP \fI\f(CI\*(C`process_args\*(C'\fI\fR .IX Subsection "process_args" .PP .Vb 1 \& $prove\->process_args(@args); .Ve .PP Processes the command-line arguments. Attributes will be set appropriately. Any filenames may be found in the \f(CW\*(C`argv\*(C'\fR attribute. .PP Dies on invalid arguments. .PP \fI\f(CI\*(C`run\*(C'\fI\fR .IX Subsection "run" .PP Perform whatever actions the command line args specified. The \f(CW\*(C`prove\*(C'\fR command line tool consists of the following code: .PP .Vb 1 \& use App::Prove; \& \& my $app = App::Prove\->new; \& $app\->process_args(@ARGV); \& exit( $app\->run ? 0 : 1 ); # if you need the exit code .Ve .PP \fI\f(CI\*(C`require_harness\*(C'\fI\fR .IX Subsection "require_harness" .PP Load a harness replacement class. .PP .Vb 1 \& $prove\->require_harness($for => $class_name); .Ve .PP \fI\f(CI\*(C`print_version\*(C'\fI\fR .IX Subsection "print_version" .PP Display the version numbers of the loaded TAP::Harness and the current Perl. .SS "Attributes" .IX Subsection "Attributes" After command line parsing the following attributes reflect the values of the corresponding command line switches. They may be altered before calling \f(CW\*(C`run\*(C'\fR. .ie n .IP """archive""" 4 .el .IP "\f(CWarchive\fR" 4 .IX Item "archive" .PD 0 .ie n .IP """argv""" 4 .el .IP "\f(CWargv\fR" 4 .IX Item "argv" .ie n .IP """backwards""" 4 .el .IP "\f(CWbackwards\fR" 4 .IX Item "backwards" .ie n .IP """blib""" 4 .el .IP "\f(CWblib\fR" 4 .IX Item "blib" .ie n .IP """color""" 4 .el .IP "\f(CWcolor\fR" 4 .IX Item "color" .ie n .IP """directives""" 4 .el .IP "\f(CWdirectives\fR" 4 .IX Item "directives" .ie n .IP """dry""" 4 .el .IP "\f(CWdry\fR" 4 .IX Item "dry" .ie n .IP """exec""" 4 .el .IP "\f(CWexec\fR" 4 .IX Item "exec" .ie n .IP """extensions""" 4 .el .IP "\f(CWextensions\fR" 4 .IX Item "extensions" .ie n .IP """failures""" 4 .el .IP "\f(CWfailures\fR" 4 .IX Item "failures" .ie n .IP """comments""" 4 .el .IP "\f(CWcomments\fR" 4 .IX Item "comments" .ie n .IP """formatter""" 4 .el .IP "\f(CWformatter\fR" 4 .IX Item "formatter" .ie n .IP """harness""" 4 .el .IP "\f(CWharness\fR" 4 .IX Item "harness" .ie n .IP """ignore_exit""" 4 .el .IP "\f(CWignore_exit\fR" 4 .IX Item "ignore_exit" .ie n .IP """includes""" 4 .el .IP "\f(CWincludes\fR" 4 .IX Item "includes" .ie n .IP """jobs""" 4 .el .IP "\f(CWjobs\fR" 4 .IX Item "jobs" .ie n .IP """lib""" 4 .el .IP "\f(CWlib\fR" 4 .IX Item "lib" .ie n .IP """merge""" 4 .el .IP "\f(CWmerge\fR" 4 .IX Item "merge" .ie n .IP """modules""" 4 .el .IP "\f(CWmodules\fR" 4 .IX Item "modules" .ie n .IP """parse""" 4 .el .IP "\f(CWparse\fR" 4 .IX Item "parse" .ie n .IP """plugins""" 4 .el .IP "\f(CWplugins\fR" 4 .IX Item "plugins" .ie n .IP """quiet""" 4 .el .IP "\f(CWquiet\fR" 4 .IX Item "quiet" .ie n .IP """really_quiet""" 4 .el .IP "\f(CWreally_quiet\fR" 4 .IX Item "really_quiet" .ie n .IP """recurse""" 4 .el .IP "\f(CWrecurse\fR" 4 .IX Item "recurse" .ie n .IP """rules""" 4 .el .IP "\f(CWrules\fR" 4 .IX Item "rules" .ie n .IP """show_count""" 4 .el .IP "\f(CWshow_count\fR" 4 .IX Item "show_count" .ie n .IP """show_help""" 4 .el .IP "\f(CWshow_help\fR" 4 .IX Item "show_help" .ie n .IP """show_man""" 4 .el .IP "\f(CWshow_man\fR" 4 .IX Item "show_man" .ie n .IP """show_version""" 4 .el .IP "\f(CWshow_version\fR" 4 .IX Item "show_version" .ie n .IP """shuffle""" 4 .el .IP "\f(CWshuffle\fR" 4 .IX Item "shuffle" .ie n .IP """state""" 4 .el .IP "\f(CWstate\fR" 4 .IX Item "state" .ie n .IP """state_class""" 4 .el .IP "\f(CWstate_class\fR" 4 .IX Item "state_class" .ie n .IP """taint_fail""" 4 .el .IP "\f(CWtaint_fail\fR" 4 .IX Item "taint_fail" .ie n .IP """taint_warn""" 4 .el .IP "\f(CWtaint_warn\fR" 4 .IX Item "taint_warn" .ie n .IP """test_args""" 4 .el .IP "\f(CWtest_args\fR" 4 .IX Item "test_args" .ie n .IP """timer""" 4 .el .IP "\f(CWtimer\fR" 4 .IX Item "timer" .ie n .IP """verbose""" 4 .el .IP "\f(CWverbose\fR" 4 .IX Item "verbose" .ie n .IP """warnings_fail""" 4 .el .IP "\f(CWwarnings_fail\fR" 4 .IX Item "warnings_fail" .ie n .IP """warnings_warn""" 4 .el .IP "\f(CWwarnings_warn\fR" 4 .IX Item "warnings_warn" .ie n .IP """tapversion""" 4 .el .IP "\f(CWtapversion\fR" 4 .IX Item "tapversion" .ie n .IP """trap""" 4 .el .IP "\f(CWtrap\fR" 4 .IX Item "trap" .PD .SH "PLUGINS" .IX Header "PLUGINS" \&\f(CW\*(C`App::Prove\*(C'\fR provides support for 3rd\-party plugins. These are currently loaded at run-time, \fIafter\fR arguments have been parsed (so you can not change the way arguments are processed, sorry), typically with the \&\f(CW\*(C`\-P\f(CIplugin\f(CW\*(C'\fR switch, eg: .PP .Vb 1 \& prove \-PMyPlugin .Ve .PP This will search for a module named \f(CW\*(C`App::Prove::Plugin::MyPlugin\*(C'\fR, or failing that, \f(CW\*(C`MyPlugin\*(C'\fR. If the plugin can't be found, \f(CW\*(C`prove\*(C'\fR will complain & exit. .PP You can pass an argument to your plugin by appending an \f(CW\*(C`=\*(C'\fR after the plugin name, eg \f(CW\*(C`\-PMyPlugin=foo\*(C'\fR. You can pass multiple arguments using commas: .PP .Vb 1 \& prove \-PMyPlugin=foo,bar,baz .Ve .PP These are passed in to your plugin's \f(CW\*(C`load()\*(C'\fR class method (if it has one), along with a reference to the \f(CW\*(C`App::Prove\*(C'\fR object that is invoking your plugin: .PP .Vb 2 \& sub load { \& my ($class, $p) = @_; \& \& my @args = @{ $p\->{args} }; \& # @args will contain ( \*(Aqfoo\*(Aq, \*(Aqbar\*(Aq, \*(Aqbaz\*(Aq ) \& $p\->{app_prove}\->do_something; \& ... \& } .Ve .PP Note that the user's arguments are also passed to your plugin's \f(CW\*(C`import()\*(C'\fR function as a list, eg: .PP .Vb 5 \& sub import { \& my ($class, @args) = @_; \& # @args will contain ( \*(Aqfoo\*(Aq, \*(Aqbar\*(Aq, \*(Aqbaz\*(Aq ) \& ... \& } .Ve .PP This is for backwards compatibility, and may be deprecated in the future. .SS "Sample Plugin" .IX Subsection "Sample Plugin" Here's a sample plugin, for your reference: .PP .Vb 1 \& package App::Prove::Plugin::Foo; \& \& # Sample plugin, try running with: \& # prove \-PFoo=bar \-r \-j3 \& # prove \-PFoo \-Q \& # prove \-PFoo=bar,My::Formatter \& \& use strict; \& use warnings; \& \& sub load { \& my ($class, $p) = @_; \& my @args = @{ $p\->{args} }; \& my $app = $p\->{app_prove}; \& \& print "loading plugin: $class, args: ", join(\*(Aq, \*(Aq, @args ), "\en"; \& \& # turn on verbosity \& $app\->verbose( 1 ); \& \& # set the formatter? \& $app\->formatter( $args[1] ) if @args > 1; \& \& # print some of App::Prove\*(Aqs state: \& for my $attr (qw( jobs quiet really_quiet recurse verbose )) { \& my $val = $app\->$attr; \& $val = \*(Aqundef\*(Aq unless defined( $val ); \& print "$attr: $val\en"; \& } \& \& return 1; \& } \& \& 1; .Ve .SH "SEE ALSO" .IX Header "SEE ALSO" prove, TAP::Harness
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0.01 |
proxy
|
phpinfo
|
Réglages