NAME
Test::NoPlan - check perl test files for 'no_plan'
SYNOPSIS
It is a good idea to ensure you have defined how many tests should be run within each test script - to catch cases where tests bomb out part way through so you know how many tests were not actually run. This module checks all your test plan files to ensure 'no_plan' is not used.
You can check one file:
use Test::NoPlan qw/ check_file_for_no_plan /;
use Test::More tests => 1;
check_file_for_no_plan('t/test.t');
or check all files:
use Test::NoPlan qw/ all_plans_ok /;
all_plans_ok();
EXPORT
all_plans_ok({ options });
Searches for and checks *.t files within the current directory. Options (with defaults shown) are:
- topdir => '.'
-
directory to begin search in - relative to the top directory in the project (i.e. where the Makefile.PL or Build.PL file is located)
- check_files => qr/\.t$/xsm
-
Regexp used to identify files to check - i.e. files ending in '.t' - note, this just checks the basename of the files; the path is excluded.
- recurse => 0
-
Recurse into any subdirectories - not done by default.
get_file_list( { [ options ] } );
Return a list of files to be checked - uses same options as all_plans_ok
check_file_for_no_plan( $filename );
Check the given file for instances of uncommented 'no_plan' usage. Returns 0 for problem, 1 for no problem found.
AUTHOR
Duncan Ferguson, < duncs@cpan.org >
BUGS
Please report any bugs or feature requests to bug-test-noplan at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-NoPlan. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Test::NoPlan
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
Source code repository at GitHub
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2009 Duncan Ferguson, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.