GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Test::Group::Plan(3) User Contributed Perl Documentation Test::Group::Plan(3)

Test::Group::Plan - test plans for test groups

  use Test::Group;
  use Test::Group::Plan;

  test_plan 3, mytest => sub {
      ok 1, "one";
      ok 2, "two";
      ok 3, "three";
  };

This module is an extension for Test::Group. It allows you to declare the number of tests that a particular group will run.

If you are not already familiar with Test::Group now would be a good time to go take a look.

By default, Test::Group doesn't care how many tests you run within each group. This is convenient, but sometimes you know how many tests should be run, and a plan provides a useful extra check that your test script is doing what you think it is.

The following function is exported by default.

As the test() function exported by Test::Group, but with an additional $plan parameter. The value of $plan must be numeric.

An extra test will be run after $groupsub returns, to check that the number of tests run was as expected. Note that you should not add 1 to the plan to account for this extra test.

Test::Group

Nick Cleaton <ncleaton@cpan.org>

Dominique Quatravaux <domq@cpan.org>

Copyright (c) 2009 by Nick Cleaton and Dominique Quatravaux

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.