Prove6
); } elsif $version { say "$*PROGRAM.basename() {App::Prove6.^ver} with TAP {TAP.^ver} on $*RAKU.compiler.gist()"; } else { @include-dirs.push($cwd.add('lib')) if $lib; @include-dirs.push($cwd.add('META6.json').e ?? $cwd !! $cwd.add('lib')) if $blib; my %new-args = (:$jobs, :$timer, :$trap, :$ignore-exit, :$loose, :$color).grep(*.value.defined); my %run-args = :$err, :$cwd, :@include-dirs; %new-args<handlers> = ( TAP::SourceHandler::Exec.new($exec.words) ) with $exec;
NAME
prove6 - Run tests through a TAP harness.
USAGE
prove6 [options] [files or directories]
| -v | --verbose Print all test lines. |
| -l | --lib Add 'lib' to the path for your tests (-Ilib). |
| -b | --blib Add module directory to the path for your tests. |
| --shuffle Run the tests in random order. | |
| --ignore-exit Ignore exit status from test scripts. | |
| --reverse Run the tests in reverse order. | |
| -q | --quiet Suppress some test output while running tests. |
| -Q | --QUIET Only print summary results. |
| --timer Print elapsed time after each test. | |
| --trap Trap Ctrl-C and print summary on interrupt. | |
| --help Display this help | |
| --version Display the version |
| -I | --incdir | Library paths to include. |
| -e | --exec | Interpreter to run the tests ('' for compiled tests.) |
| --ext | Set the extensions for tests (default <t rakutest t6>) | |
| --harness | Define test harness to use. See TAP::Harness. | |
| --reporter | Result reporter to use. | |
| -j | --jobs | Run N test jobs in parallel (try 9.) |
| --cwd | Run in certain directory | |
| --err=stderr | Direct the test's $*ERR to the harness' $*ERR. | |
| --err=ignore | Ignore test scripts' $*ERR. |
NOTES
Default Test Directory
If no files or directories are supplied, prove6 looks for all files
matching the pattern *.{t,t6,rakutest} under the directory t.
Colored Test Output
Colored test output is the default, but if output is not to a terminal, color is disabled.
Color support requires Terminal::ANSIColor on Unix-like platforms. If the
necessary module is not installed colored output will not be available.
Exit Code
If the tests fail prove6 will exit with non-zero status.
-e
Normally you can just pass a list of Raku tests and the harness will know how
to execute them. However, if your tests are not written in Raku or if you
want all tests invoked exactly the same way, use the -e switch:
prove6 -e='/usr/bin/ruby -w' t/
prove6 -e='/usr/bin/perl -Tw -mstrict -Ilib' t/
prove6 -e='/path/to/my/customer/exec'
--err
--err=stderrDirect the test's $*ERR to the harness' $*ERR.
This is the default behavior.
--err=ignoreIgnore the test script' $*ERR
--trap
The --trap option will attempt to trap SIGINT (Ctrl-C) during a test
run and display the test summary even if the run is interrupted
$*REPO
prove6 introduces a separation between "options passed to the raku which
runs prove6" and "options passed to the raku which runs tests"; this
distinction is by design. Thus the raku which is running a test starts
with the default $*REPO. Additional library directories can be added
via the RAKULIB environment variable or via the -Ilib option to
prove6.