Test::PerlTidy::XTFiles - XT::Files interface for Test::PerlTidy
Version 0.001
use Test::PerlTidy::XTFiles;
Test::PerlTidy::XTFiles->new->all_files_ok;
Adds support for the XT::Files interface to Test::PerlTidy.
Returns a new Test::PerlTidy::XTFiles
instance. new
takes an optional
hash or list with its arguments.
Test::PerlTidy::XTFiles->new(
mute => 1,
perltidyrc => 'the_perltidyrc_file_to_use',
);
The following arguments are supported:
By default, Test::PerlTidy will output diagnostics about any errors
reported by perltidy, as well as any actual differences found between the
pre-tidied and post-tidied files. Set mute
to a true value to turn off
that diagnostic output.
Internally, we set the localized $Test::PerlTidy::MUTE
package variable,
depending on this value.
The perltidy
argument can be used to specify a specific .perltidyrc
config file.
Calls the all_perl_files
method of Test::XTFiles to get all the files to
be tested. All files will be checked by calling is_file_tidy
from
Test::PerlTidy.
It calls done_testing
or skip_all
so you can't have already called
plan
.
all_files_ok
returns something true if all files test ok and false
otherwise.
Please see XT::Files for how to configure the files to be checked.
Check all the files returned by XT::Files with Test::PerlTidy.
use 5.006;
use strict;
use warnings;
use Test::PerlTidy::XTFiles;
Test::PerlTidy::XTFiles->new->all_files_ok;
Use the same test file as in Example 1 and create a .xtfilesrc
config
file in the root directory of your distribution.
[Dirs]
module = lib
module = tools
module = corpus/hello
[Files]
module = corpus/world.pm
Test::More, Test::PerlTidy, XT::Files
Please report any bugs or feature requests through the issue tracker at https://github.com/skirmess/Test-PerlTidy-XTFiles/issues. You will be notified automatically of any progress on your issue.
This is open source software. The code repository is available for public review and contribution under the terms of the license.
https://github.com/skirmess/Test-PerlTidy-XTFiles
git clone https://github.com/skirmess/Test-PerlTidy-XTFiles.git
Sven Kirmess sven.kirmess@kzone.ch