| Previous | Next
Test::BuilderA 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(reason) Terminates all tests and exits immediately.
expected_tests() Gets and sets the tests that will run and prints out the correct headers.
exported_to(package) Specifies the package you exported your functions to.
is_eq(got_from_test, expected_from_test, name_of_test) Checks if got_from_test
isnt_eq(got_from_test, did_not_expect, name_of_test) Checks if got_from_test
isnt_num(got_from_test, did_not_expect, name_of_test) Checks if got_from_test
is_num(got_from_test, expected_from_test, name_of_test) Checks if got_from_test
like(string, Checks if string matches the specified regular expression.
no_plan() Declares that there may be an infinite number of tests.
ok(test, name) Reports if test by
plan() Sets up the tests for you, prints appropriate headers, and takes appropriate actions.
skip([reason]) Skips the current test, citing reason.
skip_all(reason) Shamelessly skips all the tests, citing the given reason . Exits with . my $reason = "I didn't feel like it today."; $Test->skip_all($reason);
unlike(string, Checks if string does not match the specified regular expression. |