1Test::NoPlan(3)       User Contributed Perl Documentation      Test::NoPlan(3)
2
3
4

NAME

6       Test::NoPlan - check perl test files for 'no_plan'
7

SYNOPSIS

9       It is a good idea to ensure you have defined how many tests should be
10       run within each test script - to catch cases where tests bomb out part
11       way through so you know how many tests were not actually run.  This
12       module checks all your test plan files to ensure 'no_plan' is not used.
13
14       You can check one file:
15
16           use Test::NoPlan qw/ check_file_for_no_plan /;
17           use Test::More tests => 1;
18           check_file_for_no_plan('t/test.t');
19
20       or check all files:
21
22           use Test::NoPlan qw/ all_plans_ok /;
23           all_plans_ok();
24

EXPORT

26   all_plans_ok({ options });
27       Searches for and checks *.t files within the current directory.
28       Options (with defaults shown) are:
29
30       topdir => '.'
31           directory to begin search in - relative to the top directory in the
32           project (i.e. where the Makefile.PL or Build.PL file is located)
33
34       check_files => qr/\.t$/xsm
35           Regexp used to identify files to check - i.e. files ending in '.t'
36           - note, this just checks the basename of the files; the path is
37           excluded.
38
39       ignore_files => qr/^\..*$/xsm
40           Regexp used to identify files to ignore - i.e. files starting with
41           '.' - note, this just checks the basename of the files; the path is
42           excluded.
43
44       recurse => 0
45           Recurse into any subdirectories - not done by default.
46
47       method => '<create|new>' [default: create]
48           Amend the method by which the test object is created.  By default
49           'create' is used which is correct for tesst files containing only
50           the 'all_plans_ok' test.  If multiple tests are held within the
51           same tesst file then 'new' should be used so a single test object
52           is created and shared
53
54   get_file_list( { [ options ] } );
55       Return a list of files to be checked - uses same options as
56       "all_plans_ok"
57
58   check_file_for_no_plan( $filename );
59       Check the given file for instances of uncommented 'no_plan' usage.
60       Returns 0 for problem, 1 for no problem found.
61

AUTHOR

63       Duncan Ferguson, "< duncs@cpan.org >"
64

BUGS

66       Please report any bugs or feature requests to "bug-test-noplan at
67       rt.cpan.org", or through the web interface at
68       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-NoPlan>.  I will
69       be notified, and then you'll automatically be notified of progress on
70       your bug as I make changes.
71

SUPPORT

73       You can find documentation for this module with the perldoc command.
74
75           perldoc Test::NoPlan
76
77       You can also look for information at:
78
79       •   RT: CPAN's request tracker
80
81           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-NoPlan>
82
83       •   AnnoCPAN: Annotated CPAN documentation
84
85           <http://annocpan.org/dist/Test-NoPlan>
86
87       •   CPAN Ratings
88
89           <http://cpanratings.perl.org/d/Test-NoPlan>
90
91       •   Search CPAN
92
93           <http://search.cpan.org/dist/Test-NoPlan/>
94
95       •   Source code repository at GitHub
96
97           <http://github.com/duncs/perl-test-noplan>
98

ACKNOWLEDGEMENTS

101       Copyright 2009 Duncan Ferguson, all rights reserved.
102
103       This program is free software; you can redistribute it and/or modify it
104       under the same terms as Perl itself.
105
106
107
108perl v5.34.0                      2021-07-23                   Test::NoPlan(3)
Impressum