A backend for building test libraries under Perl. Note that Test::Builder is in the early stages of development and that things may become more (or less) stable, or may change completely. Test::Builder is more flexible than other testing modules such as Test::Simple and Test::More.
Test::Builder implements the following methods.
new |
Returns a Test::Builder object representing the current state of the test. There's no need to create more than one Test::Builder object, since you run only one test per program.
BAILOUT |
Terminates all tests and exits immediately.
expected_tests |
Gets and sets the tests that will run and prints out the correct headers.
exported_to |
Specifies the package you exported your functions to.
is_eq |
Checks if got_from_testeq expected_from_test.
isnt_eq |
Checks if got_from_testne did_not_expect.
isnt_num |
Checks if got_from_test!= did_not_expect.
is_num |
Checks if got_from_test== expected_from_test.
like |
Checks if string matches the specified regular expression.
no_plan |
Declares that there may be an infinite number of tests.
ok |
Reports if test by name is true.
plan |
Sets up the tests for you, prints appropriate headers, and takes appropriate actions. plan can be used in lieu of any of the subsequent methods.
skip |
Skips the current test, citing reason.
skip_all |
Shamelessly skips all the tests, citing the given reason . Exits with 0.
my $reason = "I didn't feel like it today."; $Test->skip_all($reason);
unlike |
Checks if string does not match the specified regular expression.
8.199. Test | 8.201. Test::Harness |
Copyright © 2002 O'Reilly & Associates. All rights reserved.