Test::File::Find::RuleTest::File::Find::Rule is a Perl module to test files and directories with File::Find::Rule. | |
Download |
Test::File::Find::Rule Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Fabien POTENCIER
- Publisher web site:
- http://search.cpan.org/~fabpot/Test-File-Find-Rule-1.00/lib/Test/File/Find/Rule.pm
Test::File::Find::Rule Tags
Test::File::Find::Rule Description
Test::File::Find::Rule is a Perl module to test files and directories with File::Find::Rule. Test::File::Find::Rule is a Perl module to test files and directories with File::Find::Rule.SYNOPSIS use Test::File::Find::Rule; # Check that all files in $dir have sensible names my $rule = File::Find::Rule ->file ->relative ->not_name(qr/^{1,8}.{3,4}$/); match_rule_no_result($rule, $dir, 'File names ok'); # Check that all our perl scripts have use strict ! my $rule = File::Find::Rule ->file ->relative ->name(@perl_ext) ->not_grep(qr/^s*uses+strict;/m, sub { 1 }); match_rule_no_result($rule, $dir, 'use strict usage'); # With some help of File::Find::Rule::MMagic # Check that there is less than 10 images in $dir # with a size > 1Mo my $rule = File::Find::Rule ->file ->relative ->magic('image/*') ->size('>1Mo'); match_rule_nb_result($rule, $dir, '100', 'A lot of big images'); # Check the exact result from a rule my $dirs = ; my $rule = File::Find::Rule ->directory ->mindepth(1) ->maxdepth(1) ->relative; match_rule_array($rule, $dir, $dirs, 'Directory structure ok'));Requirements:· Perl Requirements: · Perl
Test::File::Find::Rule Related Software