Test::BlockTest::Block is a Perl module that allows you to specify fine granularity test plans. | |
Download |
Test::Block Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Adrian Howard
- Publisher web site:
- http://search.cpan.org/~adie/Test-Block-0.11/lib/Test/Block.pm
Test::Block Tags
Test::Block Description
Test::Block is a Perl module that allows you to specify fine granularity test plans. Test::Block is a Perl module that allows you to specify fine granularity test plans.SYNOPSIS use Test::More 'no_plan'; use Test::Block qw($Plan); { # This block should run exactly two tests local $Plan = 2; pass 'first test'; # oops. forgot second test }; SKIP: { local $Plan = 3; pass('first test in second block'); skip "skip remaining tests" => $Plan; }; ok( Test::Block->all_in_block, 'all test run in blocks' ); is( Test::Block->block_count, 2, 'two blocks ran' ); # This produces... ok 1 - first test not ok 2 - block expected 2 test(s) and ran 1 # Failed test (foo.pl at line 6) ok 3 - first test in second block ok 4 # skip skip remaining tests ok 5 # skip skip remaining tests ok 6 - all test run in blocks ok 7 - two blocks ran 1..7 # Looks like you failed 1 tests of 7.This module allows you to specify the number of expected tests at a finer level of granularity than an entire test script. It is built with Test::Builder and plays happily with Test::More and friends. Requirements: · Perl
Test::Block Related Software