App-CSE

 view release on metacpan or  search on metacpan

t/10-hidden.t  view on Meta::CPAN

                 );

foreach my $hidden_file ( @hidden_files ){
    my $hidden = 0;
    ok( ! $cse->ignore_reassembl()->match( $hidden_file ), "Matching $hidden_file" );
    $cse->is_file_valid($hidden_file, { on_hidden => sub{ $hidden = 1; } });
    is( $hidden , 1 , "Hidden is 1 for file $hidden_file");
}


my @not_hidden = ( './toto.txt' , 'toto' , 'toto.txt' ,
                   './lib/App/CSE/Command/Watch.pm',
                   'lib/App/CSE/Command/Bla.pm',
                   'lib/App/CSE/Command/Bla',
                   'lib/App/CSE/./Command/Bla',
                 );
foreach my $not_hidden_file ( @not_hidden ){
  my $hidden = 0;
  $cse->is_file_valid($not_hidden_file, { on_hidden => sub{ $hidden = 1; } });
  is( $hidden , 0 , "Hidden is 0 for file $not_hidden_file");
}


ok(1);
done_testing();



( run in 0.878 second using v1.01-cache-2.11-cpan-4d4bc49f3ae )