Parrot::Test - Parrot Test
Set the number of tests to be run like this:
use Parrot::Test tests => 8;
Write individual tests like this:
output_is(<<'CODE', <<'OUTPUT', "description of test"); ... CODE ... OUTPUT
This module provides various Parrot-specific test functions.
In the following functions $description should describe the test.
$description
output_is($code, $expected, $description)
Runs the PASM code and passes the test if a string comparison of output with the expected result it true.
output_like($code, $expected, $description)
Runs the PASM code and passes the test if output matches the expected result.
output_isnt($code, $expected, $description)
Runs the PASM code and passes the test if a string comparison of output with the expected result it false.
pir_output_is($code, $expected, $description)
Runs the PIR code and passes the test if a string comparison of output with the expected result it true.
pir_output_like($code, $expected, $description)
Runs the PIR code and passes the test if output matches the expected result.
pir_output_isnt($code, $expected, $description)
Runs the PIR code and passes the test if a string comparison of output with the expected result it false.
c_output_is($code, $expected, $description)
Compiles and runs the C code, passing the test if a string comparison of output with the expected result it true.
c_output_like($code, $expected, $description)
Compiles and runs the C code, passing the test if output matches the expected result.
c_output_isnt($code, $expected, $description)
Compiles and runs the C code, passing the test if a string comparison of output with the expected result it false.
skip($why, $how_many)
Use within a SKIP: { ... } block to indicate why and how many test are being skipped.
SKIP: { ... }
To install Make, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Make
CPAN shell
perl -MCPAN -e shell install Make
For more information on module installation, please visit the detailed CPAN module installation guide.