Bug 23119: MARC21 added title 246, 730 subfield i displays out of order, and should...
[koha.git] / t / 00-deprecated.t
blob6eba09deba3d193093e44a47af3b8fe4fd0fb5b3
1 #!/usr/bin/perl
3 # Tests usage of deprecated Perl syntax. Deprecated could be extended to the
4 # sense of 'not allowed'.
6 use warnings;
7 use strict;
8 use Test::More tests => 1;
9 use File::Find;
10 use Cwd;
12 my @files_with_switch = do {
13 my @files;
14 local $/ = undef;
15 find( sub {
16 my $dir = getcwd();
17 return if $dir =~ /blib/;
18 return unless /\.(pl|pm)$/; # Don't inspect non-Perl files
19 open my $fh, "<", $_;
20 my $content = <$fh>;
21 push @files, "$dir/$_" if $content =~ /switch\s*\(.*{/;
22 }, ( '.' ) );
23 @files;
25 ok( !@files_with_switch, "Perl syntax: no use of switch statement" )
26 or diag( "Files list: " . join(', ', @files_with_switch) );