NAME
Keystone::Resolver::Test - run tests for the Keystone Resolver library
SYNOPSIS
my %opts = ( loglevel => 0x600 );
Keystone::Resolver::Test::run_test(\%opts, "path/to/test");
DESCRIPTION
This module is not part of the resolver per se, but is used to test it. It exists to provide a single function, run_test()
, described below.
METHODS
run_test()
Keystone::Resolver::Test::run_test(\%opts, "path/to/test");
# -- or --
$status = Keystone::Resolver::Test::run_test(\%opts, "path/to/test", 1);
Runs the indicated test, using a resolver created with the specified options. If the optional third parameter is absent or false, then output is written describing the outcome of the test. If it is provided and true, then no output is generated. In any case, an integer status is returned as follows:
- 0
-
Success.
- 1
-
The test was run without errors, but the generated XML was different from what the test-file said to expect.
- 2
-
The test could not be run because of a fatal error in the resolver.
- 3
-
The test could not be run because the test-case was malformed.
- 4
-
The test could not be run because of a system error.
write_test()
$status = Keystone::Resolver::Test::write_test(\%opts, "another/test", 1);
Like run_test()
, but instead of testing the results of running the test against a known-good regression output, it writes the results to that output for the use of subsequent regression testing.
4 POD Errors
The following errors were encountered while parsing the POD:
- Around line 47:
Expected text after =item, not a number
- Around line 52:
Expected text after =item, not a number
- Around line 56:
Expected text after =item, not a number
- Around line 60:
Expected text after =item, not a number