Test::Instruction - A test framework
Version 0.01
use Test::Instruction qw/all/; use Module::To::Test; instruction( test => 'true', func => \&Module::To::Test::true_function ); instruction( test => 'false', func => \&Module::To::Test::false_function ); my $obj = Module::To::Test->new(); instruction( test => 'hash', instance => $obj, meth => 'method_that_returns_a_hash', expected => { a => 1, b => 2, c => 3 } ); finish(3);
instruction( test => 'ok', instance => Module::To::Test->new(), func => 'okay', args => { data => '...' }, );
you can currently run the following tests.
over
when you want to catch exceptions....
catch => 1,
defaults the instruction{test} to like.
my $instance = My::Test::Module->new(); instance => $instance,
call a method from the instance
instance => $instance, meth => 'render'
func => \&My::Test::Module::render,
{} or []
args => [qw/one, two/], args_list => 1,
index - required when testing - ref_index_* and list_index_*
key - required when testing - ref_key_* and list_key_*
LNATION, <email at lnation.org>
<email at lnation.org>
Please report any bugs or feature requests to bug-test-instruction at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Instruction. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-test-instruction at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Test::Instruction
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
https://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Instruction
CPAN Ratings
https://cpanratings.perl.org/d/Test-Instruction
Search CPAN
https://metacpan.org/release/Test-Instruction
This software is Copyright (c) 2022 by LNATION.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
=cut found outside a pod block. Skipping to next block.
To install Test::Instruction, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::Instruction
CPAN shell
perl -MCPAN -e shell install Test::Instruction
For more information on module installation, please visit the detailed CPAN module installation guide.