Test::Harness::FileFilter - Run only tests whose filename matches a pattern.


Test-Harness-FileFilter documentation  | view source Contained in the Test-Harness-FileFilter distribution.

Index


VERSION

Top

Version 0.01

SYNOPSIS

Top

When using Test::Harness::FileFilter with a dist that has a standard distribution Makefile

 # Enable Test::Harness::FileFilter
 export PERL5OPT=${PERL5OPT}:-MTest::Harness::FileFilter

 # Only run 00-load.t, 01-test-function.t etc....
 export HARNESS_ACCEPT_FILES '^\d+(-\w+)+\.t'

 # Run suite
 make test

DESCRIPTION

Top

Test::Harness::FileFilter is an "extension" to Test::Harness that lets you selectivly accept or ignore files by matching each filename with an regular expression.

ENVIRONMENT

Top

PERL5OPT

Used by perl to include extra command-line switches such as -I... or -M.... This environment variable is used to "load" Test::Harness::FileFilter. It should be set to include -MTest::Harness::FileFilter.

HARNESS_IGNORE_FILES

Sets the regexp that will be matched on all files in the set. If it matches, the file is removed from the set.

HARNESS_ACCEPT_FILES

Sets the regep that will be matched on all files in the set. If it matches, the file is included in the set.

CAUTIONARY NOTE

Top

If both HARNESS_IGNORE_FILES and HARNESS_ACCEPT_FILES are defined the set will first be reduced by the "ignore"-regexp and the resulting set will be futher reduced by the "accept"-regexp.

BUGS

Top

Test::Harness::FileFilter will not work thru PERL5OPT if perl is invoked with -T (taint mode).

AUTHOR

Top

Claes Jacobsson, <claesjac@cpan.org>

BUGS

Top

Please report any bugs or feature requests to bug-test-harness-filefilter@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Harness-FileFilter. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

COPYRIGHT & LICENSE

Top


Test-Harness-FileFilter documentation  | view source Contained in the Test-Harness-FileFilter distribution.