diff options
Diffstat (limited to 'cpan/Test-Harness/bin/prove')
-rwxr-xr-x[-rw-r--r--] | cpan/Test-Harness/bin/prove | 137 |
1 files changed, 85 insertions, 52 deletions
diff --git a/cpan/Test-Harness/bin/prove b/cpan/Test-Harness/bin/prove index a592a80f0d..8264171431 100644..100755 --- a/cpan/Test-Harness/bin/prove +++ b/cpan/Test-Harness/bin/prove @@ -21,50 +21,54 @@ prove - Run tests through a TAP harness. Boolean options: - -v, --verbose Print all test lines. - -l, --lib Add 'lib' to the path for your tests (-Ilib). - -b, --blib Add 'blib/lib' and 'blib/arch' to the path for your tests - -s, --shuffle Run the tests in random order. - -c, --color Colored test output (default). - --nocolor Do not color test output. - --count Show the X/Y test count when not verbose (default) - --nocount Disable the X/Y test count. - -D --dry Dry run. Show test that would have run. - --ext Set the extension for tests (default '.t') - -f, --failures Show failed tests. - -o, --comments Show comments. - --fork Fork to run harness in multiple processes. - --ignore-exit Ignore exit status from test scripts. - -m, --merge Merge test scripts' STDERR with their STDOUT. - -r, --recurse Recursively descend into directories. - --reverse Run the tests in reverse order. - -q, --quiet Suppress some test output while running tests. - -Q, --QUIET Only print summary results. - -p, --parse Show full list of TAP parse errors, if any. - --directives Only show results with TODO or SKIP directives. - --timer Print elapsed time after each test. - --normalize Normalize TAP output in verbose output - -T Enable tainting checks. - -t Enable tainting warnings. - -W Enable fatal warnings. - -w Enable warnings. - -h, --help Display this help - -?, Display this help - -H, --man Longer manpage for prove - --norc Don't process default .proverc + -v, --verbose Print all test lines. + -l, --lib Add 'lib' to the path for your tests (-Ilib). + -b, --blib Add 'blib/lib' and 'blib/arch' to the path for + your tests + -s, --shuffle Run the tests in random order. + -c, --color Colored test output (default). + --nocolor Do not color test output. + --count Show the X/Y test count when not verbose + (default) + --nocount Disable the X/Y test count. + -D --dry Dry run. Show test that would have run. + --ext Set the extension for tests (default '.t') + -f, --failures Show failed tests. + -o, --comments Show comments. + --ignore-exit Ignore exit status from test scripts. + -m, --merge Merge test scripts' STDERR with their STDOUT. + -r, --recurse Recursively descend into directories. + --reverse Run the tests in reverse order. + -q, --quiet Suppress some test output while running tests. + -Q, --QUIET Only print summary results. + -p, --parse Show full list of TAP parse errors, if any. + --directives Only show results with TODO or SKIP directives. + --timer Print elapsed time after each test. + --normalize Normalize TAP output in verbose output + -T Enable tainting checks. + -t Enable tainting warnings. + -W Enable fatal warnings. + -w Enable warnings. + -h, --help Display this help + -?, Display this help + -H, --man Longer manpage for prove + --norc Don't process default .proverc Options that take arguments: - -I Library paths to include. - -P Load plugin (searches App::Prove::Plugin::*.) - -M Load a module. - -e, --exec Interpreter to run the tests ('' for compiled tests.) - --harness Define test harness to use. See TAP::Harness. - --formatter Result formatter to use. See TAP::Harness. - -a, --archive Store the resulting TAP in an archive file. - -j, --jobs N Run N test jobs in parallel (try 9.) - --state=opts Control prove's persistent state. - --rc=rcfile Process options from rcfile + -I Library paths to include. + -P Load plugin (searches App::Prove::Plugin::*.) + -M Load a module. + -e, --exec Interpreter to run the tests ('' for compiled + tests.) + --harness Define test harness to use. See TAP::Harness. + --formatter Result formatter to use. See FORMATTERS. + --source Load and/or configure a SourceHandler. See + SOURCE HANDLERS. + -a, --archive out.tgz Store the resulting TAP in an archive file. + -j, --jobs N Run N test jobs in parallel (try 9.) + --state=opts Control prove's persistent state. + --rc=rcfile Process options from rcfile =head1 NOTES @@ -76,7 +80,7 @@ in F<.proverc> are specified in the same way as command line options: # .proverc --state=hot,fast,save - -j9 --fork + -j9 Additional option files may be specified with the C<--rc> option. Default option file processing is disabled by the C<--norc> option. @@ -101,7 +105,7 @@ matching the pattern C<t/*.t>. =head2 Colored Test Output Colored test output is the default, but if output is not to a -terminal, color is disabled. You can override this by adding the +terminal, color is disabled. You can override this by adding the C<--color> switch. Color support requires L<Term::ANSIColor> on Unix-like platforms and @@ -118,7 +122,7 @@ It is possible to supply arguments to tests. To do so separate them from prove's own arguments with the arisdottle, '::'. For example prove -v t/mytest.t :: --url http://example.com - + would run F<t/mytest.t> with the options '--url http://example.com'. When running multiple tests they will each receive the same arguments. @@ -137,7 +141,7 @@ switch: If you need to make sure your diagnostics are displayed in the correct order relative to test results you can use the C<--merge> option to -merge the test scripts' STDERR into their STDOUT. +merge the test scripts' STDERR into their STDOUT. This guarantees that STDOUT (where the test results appear) and STDOUT (where the diagnostics appear) will stay in sync. The harness will @@ -175,7 +179,7 @@ Run only the tests that failed on the last run. # Run all tests $ prove -b --state=save - + # Run failures $ prove -b --state=failed @@ -224,7 +228,7 @@ Run the tests in slowest to fastest order. This is useful in conjunction with the C<-j> parallel testing switch to ensure that your slowest tests start running first. - $ prove -b --state=slow -j9 + $ prove -b --state=slow -j9 =item C<fast> @@ -268,11 +272,40 @@ via the C<-Ilib> option to F<prove>. Normally when a Perl program is run in taint mode the contents of the C<PERL5LIB> environment variable do not appear in C<@INC>. -Because C<PERL5LIB> is often used during testing to add build directories -to C<@INC> prove (actually L<TAP::Parser::Source::Perl>) passes the -names of any directories found in C<PERL5LIB> as -I switches. The net -effect of this is that C<PERL5LIB> is honoured even when prove is run in -taint mode. +Because C<PERL5LIB> is often used during testing to add build +directories to C<@INC> prove passes the names of any directories found +in C<PERL5LIB> as -I switches. The net effect of this is that +C<PERL5LIB> is honoured even when prove is run in taint mode. + + +=head1 FORMATTERS + +You can load a custom L<TAP::Parser::Formatter>: + + prove --formatter MyFormatter + +=head1 SOURCE HANDLERS + +You can load custom L<TAP::Parser::SourceHandler>s, to change the way the +parser interprets particular I<sources> of TAP. + + prove --source MyHandler --source YetAnother t + +If you want to provide config to the source you can use: + + prove --source MyCustom \ + --source Perl --perl-option 'foo=bar baz' --perl-option avg=0.278 \ + --source File --file-option extensions=.txt --file-option extensions=.tmp t + +Each C<--$source-option> option must specify a key/value pair separated by an +C<=>. If an option can take multiple values, just specify it multiple times, +as with the C<extensions=> examples above. + +All C<--sources> are combined into a hash, and passed to L<TAP::Harness/new>'s +C<sources> parameter. + +See L<TAP::Parser::IteratorFactory> for more details on how configuration is +passed to I<SourceHandlers>. =head1 PLUGINS |