Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

test::fixme(3pm) [debian man page]

Test::Fixme(3pm)					User Contributed Perl Documentation					  Test::Fixme(3pm)

NAME
Test::Fixme - check code for FIXMEs. SYNOPSIS
# In a test script like 't/test-fixme.t' use Test::Fixme; run_tests(); # You can also tailor the behaviour. use Test::Fixme; run_tests( where => 'lib', # where to find files to check match => 'TODO', # what to check for skip_all => $ENV{SKIP} # should all tests be skipped ); DESCRIPTION
When coding it is common to come up against problems that need to be addressed but that are not a big deal at the moment. What generally happens is that the coder adds comments like: # FIXME - what about windows that are bigger than the screen? # FIXME - add checking of user priviledges here. Test::Fixme allows you to add a test file that ensures that none of these get forgotten in the module. Arguments By default run_tests will search for 'FIXME' in all the files it can find in the project. You can change these defaults by using 'where' or 'match' as follows: run_tests( where => 'lib', # just check the modules. match => 'TODO' # look for things that are not done yet. ); where Specifies where to search for files. This can be a scalar containing a single directory name, or it can be a listref containing multiple directory names. match Expression to search for within the files. This may be a simple string, or a qr//-quoted regular expression. For example: match => qr/[T]ODO|[F]IXME|[B]UG/, filename_match Expression to filter file names. This should be a qr//-quoted regular expression. For example: match => qr/.(:pm|pl)$/, would only match .pm and .pl files under your specified directory. HINTS
If you want to match something other than 'FIXME' then you may find that the test file itself is being caught. Try doing this: run_tests( match => 'TO'.'DO' ); You may also wish to suppress the tests - try this: use Test::Fixme; run_tests( skip_all => $ENV{SKIP_TEST_FIXME} ); You can only run run_tests once per file. Please use several test files if you want to run several different tests. SEE ALSO
Devel::FIXME AUTHOR
Edmund von der Burg <evdb@ecclestoad.co.uk> Please let me know if you have any comments or suggestions. <http://ecclestoad.co.uk/> ACKNOWLEDGMENTS
Dave O'Neill added support for 'filename_match' and also being able to pass a list of several directories in the 'where' argument. Many thanks. LICENSE
Copryight (C) 2008 Edmund von der Burg "<evdb@ecclestoad.co.uk"> This library is free software . You can redistribute it and/or modify it under the same terms as perl itself. perl v5.10.0 2009-03-12 Test::Fixme(3pm)

Check Out this Related Man Page

Test::UseAllModules(3pm)				User Contributed Perl Documentation				  Test::UseAllModules(3pm)

NAME
Test::UseAllModules - do use_ok() for all the MANIFESTed modules SYNOPSIS
# basic usage use strict; use Test::UseAllModules; BEGIN { all_uses_ok(); } # if you also want to test modules under t/lib use strict; use Test::UseAllModules under => qw(lib t/lib); BEGIN { all_uses_ok(); } # if you have modules that'll fail use_ok() for themselves use strict; use Test::UseAllModules; BEGIN { all_uses_ok except => qw( Some::Dependent::Module Another::Dependent::Module ^Yet::Another::Dependent::.* # you can use regex ) } DESCRIPTION
I'm sick of writing 00_load.t (or something like that) that'll do use_ok() for every module I write. I'm sicker of updating 00_load.t when I add another file to the distro. This module reads MANIFEST to find modules to be tested and does use_ok() for each of them. Now all you have to do is update MANIFEST. You don't have to modify the test any more (hopefully). EXPORTED FUNCTION
all_uses_ok Does Test::More's use_ok() for every module found in MANIFEST. If you have modules you don't want to test, give those modules or some regex rules as the argument. The word 'except' is ignored as shown above. As of 0.11, you can also test modules under arbitrary directories by providing a directory list at the loading time (the word 'under' is ignored as shown above). Modules under the lib directory are always tested. PROTECTED FUNCTION
_get_module_list Returns module paths to test. This function will not be exported. If you want to use this (see below), you always need to call it by the full qualified name. NOTES
As of 0.03, this module calls BAIL_OUT of Test::More if any of the use_ok tests should fail. (Thus the following tests will be ignored. Missing or unloadable modules cause a lot of errors of the same kind.) As of 0.12, you can add extra tests before/after all_uses_ok() if you explicitly declare test plan like this. use strict; use warnings; use Test::More; use Test::UseAllModules; use Test::NoWarnings; plan tests => Test::UseAllModules::_get_module_list() + 1; all_uses_ok(); # and extra nowarnings test SEE ALSO
There're several modules like this on the CPAN now. Test::Compile and a bit confusing Test::LoadAllModules try to find modules to test by traversing directories. I'm not a big fun of them as they tend to find temporary or unrelated modules as well, but they may be handier especially if you're too lazy to update MANIFEST every time. AUTHOR
Kenichi Ishigaki, <ishigaki@cpan.org> COPYRIGHT AND LICENSE
Copyright (C) 2006 by Kenichi Ishigaki This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.0 2009-05-27 Test::UseAllModules(3pm)
Man Page