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

NAME

6       Test::Fixme - check code for FIXMEs.
7

SYNOPSIS

9           # In a test script like 't/test-fixme.t'
10           use Test::Fixme;
11           run_tests();
12
13           # You can also tailor the behaviour.
14           use Test::Fixme;
15           run_tests( where    => 'lib',      # where to find files to check
16                      match    => 'TODO',     # what to check for
17                      skip_all => $ENV{SKIP}  # should all tests be skipped
18           );
19

DESCRIPTION

21       When coding it is common to come up against problems that need to be
22       addressed but that are not a big deal at the moment. What generally
23       happens is that the coder adds comments like:
24
25        # FIXME - what about windows that are bigger than the screen?
26
27        # FIXME - add checking of user priviledges here.
28
29       Test::Fixme allows you to add a test file that ensures that none of
30       these get forgotten in the module.
31
32   Arguments
33       By default run_tests will search for 'FIXME' in all the files it can
34       find in the project. You can change these defaults by using 'where' or
35       'match' as follows:
36
37           run_tests( where => 'lib', # just check the modules.
38                      match => 'TODO' # look for things that are not done yet.
39           );
40
41       where
42           Specifies where to search for files.  This can be a scalar
43           containing a single directory name, or it can be a listref
44           containing multiple directory names.
45
46       match
47           Expression to search for within the files.  This may be a simple
48           string, or a qr//-quoted regular expression.  For example:
49
50               match => qr/[T]ODO|[F]IXME|[B]UG/,
51
52       filename_match
53           Expression to filter file names.  This should be a qr//-quoted
54           regular expression.  For example:
55
56               match => qr/\.(:pm|pl)$/,
57
58           would only match .pm and .pl files under your specified directory.
59

HINTS

61       If you want to match something other than 'FIXME' then you may find
62       that the test file itself is being caught. Try doing this:
63
64           run_tests( match => 'TO'.'DO' );
65
66       You may also wish to suppress the tests - try this:
67
68           use Test::Fixme;
69           run_tests( skip_all => $ENV{SKIP_TEST_FIXME} );
70
71       You can only run run_tests once per file. Please use several test files
72       if you want to run several different tests.
73

SEE ALSO

75       Devel::FIXME
76

AUTHOR

78       Edmund von der Burg <evdb@ecclestoad.co.uk>
79
80       Please let me know if you have any comments or suggestions.
81
82       <http://ecclestoad.co.uk/>
83

ACKNOWLEDGMENTS

85       Dave O'Neill added support for 'filename_match' and also being able to
86       pass a list of several directories in the 'where' argument. Many
87       thanks.
88

LICENSE

90       Copryight (C) 2008 Edmund von der Burg "<evdb@ecclestoad.co.uk">
91
92       This library is free software . You can redistribute it and/or modify
93       it under the same terms as perl itself.
94
95
96
97perl v5.12.3                      2009-03-12                    Test::Fixme(3)
Impressum