![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
perlman:Test::Harnessby root (Monk) |
on Dec 23, 1999 at 00:53 UTC ( [id://1251]=perlfunc: print w/replies, xml ) | Need Help?? |
Test::HarnessSee the current Perl documentation for Test::Harness. Here is our local, out-dated (pre-5.6) version: ![]() Test::Harness - run perl standard test scripts with statistics
![]() use Test::Harness;
![]() (By using the Test module, you can write test scripts without knowing the exact output this module expects. However, if you need to know the specifics, read on!)
Perl test scripts print to standard output
After all tests have been performed,
The test script output
Any output from the testscript to standard error is ignored and bypassed,
thus will be seen by the user. Lines written to standard output containing
It is tolerated if the test numbers after
print <<END; 1..6 not ok ok not ok ok ok END will generate
FAILED tests 1, 3, 6 Failed 3/6 tests, 50.00% okay
The global variable $Test::Harness::verbose is exportable and can be used to let
The global variable $Test::Harness::switches is exportable and can be used to set perl command line options used for running the test
If the standard output line contains substring
EXPORT
DIAGNOSTICS
ENVIRONMENT
Setting
If
LEAKED FILES: scr.tmp 0 my.db
If relative, directory name is with respect to the current directory at the moment
SEE ALSOTest for writing test scripts and also Benchmark for the underlying timing routines.
AUTHORSEither Tim Bunce or Andreas Koenig, we don't know. What we know for sure is, that it was inspired by Larry Wall's TEST script that came with perl distributions for ages. Numerous anonymous contributors exist. Current maintainer is Andreas Koenig.
BUGS
Test::Harness uses
$^X to determine the perl binary to run the tests
with. Test scripts running via the shebang ( |
|