Jump to letter: [
ABCDEFGHIJKLMNOPQRSTUVWXYZ
]
perl-Test-Inline - Test-Inline - Inlining your tests next to the code being tested.
- Description:
B<LOOK AT Test::Inline::Tutorial FIRST!>
Embedding tests allows tests to be placed near the code its testing.
This is a nice supplement to the traditional .t files. It's like
XUnit, Perl-style.
Test::Tutorial is just documentation. To actually get anything done
you use pod2test. Read the Test::Inline::Tutoral, really.
A test is denoted using either "=for testing" or a "=begin/end
testing" block.
=item B<is_pirate>
@pirates = is_pirate(@arrrgs);
Go through @arrrgs and return a list of pirates.
=begin testing
my @p = is_pirate('Blargbeard', 'Alfonse', 'Capt. Hampton', 'Wesley');
ok(@p == 2);
=end testing
Packages