.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05) .\" .\" Standard preamble: .\" ======================================================================== .de Sh \" Subsection heading .br .if t .Sp .ne 5 .PP \fB\\$1\fR .PP .. .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" '' '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 (.Sh), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" 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 "PROVE 1" .TH PROVE 1 "2008-11-26" "perl v5.10.0" "Perl Programmers Reference Guide" .\" 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" prove \-\- A command\-line tool for running tests against Test::Harness .SH "SYNOPSIS" .IX Header "SYNOPSIS" prove [options] [files/directories] .SH "OPTIONS" .IX Header "OPTIONS" .Vb 10 \& \-b, \-\-blib Adds blib/lib to the path for your tests, a la "use blib" \& \-d, \-\-debug Includes extra debugging information \& \-D, \-\-dry Dry run: Show the tests to run, but don\*(Aqt run them \& \-h, \-\-help Display this help \& \-H, \-\-man Longer manpage for prove \& \-I Add libraries to @INC, as Perl\*(Aqs \-I \& \-l, \-\-lib Add lib to the path for your tests \& \-\-perl Sets the name of the Perl executable to use \& \-r, \-\-recurse Recursively descend into directories \& \-s, \-\-shuffle Run the tests in a random order \& \-\-strap Define strap class to use \& \-T Enable tainting checks \& \-t Enable tainting warnings \& \-\-timer Print elapsed time after each test file \& \-v, \-\-verbose Display standard output of test scripts while running them \& \-V, \-\-version Display version info .Ve .PP Single-character options may be stacked. Default options may be set by specifying the \s-1PROVE_SWITCHES\s0 environment variable. .SH "OVERVIEW" .IX Header "OVERVIEW" \&\fIprove\fR is a command-line interface to the test-running functionality of \f(CW\*(C`Test::Harness\*(C'\fR. With no arguments, it will run all tests in the current directory. .PP Shell metacharacters may be used with command lines options and will be exanded via \f(CW\*(C`File::Glob::bsd_glob\*(C'\fR. .ie n .SH "PROVE VS. ""MAKE TEST""" .el .SH "PROVE VS. ``MAKE TEST''" .IX Header "PROVE VS. MAKE TEST" \&\fIprove\fR has a number of advantages over \f(CW\*(C`make test\*(C'\fR when doing development. .IP "\(bu" 4 \&\fIprove\fR is designed as a development tool .Sp Perl users typically run the test harness through a makefile via \&\f(CW\*(C`make test\*(C'\fR. That's fine for module distributions, but it's suboptimal for a test/code/debug development cycle. .IP "\(bu" 4 \&\fIprove\fR is granular .Sp \&\fIprove\fR lets your run against only the files you want to check. Running \f(CW\*(C`prove t/live/ t/master.t\*(C'\fR checks every \fI*.t\fR in \fIt/live\fR, plus \fIt/master.t\fR. .IP "\(bu" 4 \&\fIprove\fR has an easy verbose mode .Sp \&\fIprove\fR has a \f(CW\*(C`\-v\*(C'\fR option to see the raw output from the tests. To do this with \f(CW\*(C`make test\*(C'\fR, you must set \f(CW\*(C`HARNESS_VERBOSE=1\*(C'\fR in the environment. .IP "\(bu" 4 \&\fIprove\fR can run under taint mode .Sp \&\fIprove\fR's \f(CW\*(C`\-T\*(C'\fR runs your tests under \f(CW\*(C`perl \-T\*(C'\fR, and \f(CW\*(C`\-t\*(C'\fR runs them under \f(CW\*(C`perl \-t\*(C'\fR. .IP "\(bu" 4 \&\fIprove\fR can shuffle tests .Sp You can use \fIprove\fR's \f(CW\*(C`\-\-shuffle\*(C'\fR option to try to excite problems that don't show up when tests are run in the same order every time. .IP "\(bu" 4 \&\fIprove\fR doesn't rely on a make tool .Sp Not everyone wants to write a makefile, or use ExtUtils::MakeMaker to do so. \fIprove\fR has no external dependencies. .IP "\(bu" 4 Not everything is a module .Sp More and more users are using Perl's testing tools outside the context of a module distribution, and may not even use a makefile at all. .SH "COMMAND LINE OPTIONS" .IX Header "COMMAND LINE OPTIONS" .Sh "\-b, \-\-blib" .IX Subsection "-b, --blib" Adds blib/lib to the path for your tests, a la \*(L"use blib\*(R". .Sh "\-d, \-\-debug" .IX Subsection "-d, --debug" Include debug information about how \fIprove\fR is being run. This option doesn't show the output from the test scripts. That's handled by \-v,\-\-verbose. .Sh "\-D, \-\-dry" .IX Subsection "-D, --dry" Dry run: Show the tests to run, but don't run them. .Sh "\-I" .IX Subsection "-I" Add libraries to \f(CW@INC\fR, as Perl's \-I. .Sh "\-l, \-\-lib" .IX Subsection "-l, --lib" Add \f(CW\*(C`lib\*(C'\fR to \f(CW@INC\fR. Equivalent to \f(CW\*(C`\-Ilib\*(C'\fR. .Sh "\-\-perl" .IX Subsection "--perl" Sets the \f(CW\*(C`HARNESS_PERL\*(C'\fR environment variable, which controls what Perl executable will run the tests. .Sh "\-r, \-\-recurse" .IX Subsection "-r, --recurse" Descends into subdirectories of any directories specified, looking for tests. .Sh "\-s, \-\-shuffle" .IX Subsection "-s, --shuffle" Sometimes tests are accidentally dependent on tests that have been run before. This switch will shuffle the tests to be run prior to running them, thus ensuring that hidden dependencies in the test order are likely to be revealed. The author hopes the run the algorithm on the preceding sentence to see if he can produce something slightly less awkward. .Sh "\-\-strap" .IX Subsection "--strap" Sets the \s-1HARNESS_STRAP_CLASS\s0 variable to set which Test::Harness::Straps variable to use in running the tests. .Sh "\-t" .IX Subsection "-t" Runs test programs under perl's \-t taint warning mode. .Sh "\-T" .IX Subsection "-T" Runs test programs under perl's \-T taint mode. .Sh "\-\-timer" .IX Subsection "--timer" Print elapsed time after each test file .Sh "\-v, \-\-verbose" .IX Subsection "-v, --verbose" Display standard output of test scripts while running them. Also sets \&\s-1TEST_VERBOSE\s0 in case your tests rely on them. .Sh "\-V, \-\-version" .IX Subsection "-V, --version" Display version info. .SH "BUGS" .IX Header "BUGS" Please use the \s-1CPAN\s0 bug ticketing system at . You can also mail bugs, fixes and enhancements to \&\f(CW\*(C`\*(C'\fR. .SH "TODO" .IX Header "TODO" .IP "\(bu" 4 Shuffled tests must be recreatable .SH "AUTHORS" .IX Header "AUTHORS" Andy Lester \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2004\-2006 by Andy Lester \f(CW\*(C`\*(C'\fR. .PP This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .PP See .