Lines 20-37
use Test::More;
Link Here
|
20 |
|
20 |
|
21 |
use File::Slurp qw(read_file); |
21 |
use File::Slurp qw(read_file); |
22 |
|
22 |
|
23 |
my @excluded_paths = qw(C4 debian docs etc installer/data install_misc Koha misc selenium t test tmp xt changelanguage.pl build-resources.PL fix-perl-path.PL ); |
23 |
my @excluded_paths = |
24 |
push @excluded_paths, 'opac'; # We cannot test the OPAC scripts, some can be accessed without authentication |
24 |
qw(C4 debian docs etc installer/data install_misc Koha misc selenium t test tmp xt changelanguage.pl build-resources.PL fix-perl-path.PL koha_perl_deps.pl ); |
|
|
25 |
push @excluded_paths, 'opac'; # We cannot test the OPAC scripts, some can be accessed without authentication |
25 |
|
26 |
|
26 |
my $grep_cmd = q{git grep -l '#!/usr/bin/perl' -- } . join( ' ', map { qq{':!$_'} } @excluded_paths ); |
27 |
my $grep_cmd = q{git grep -l '#!/usr/bin/perl' -- } . join( ' ', map { qq{':!$_'} } @excluded_paths ); |
27 |
my @files = `$grep_cmd`; |
28 |
my @files = `$grep_cmd`; |
28 |
|
29 |
|
29 |
my @missing_auth_check; |
30 |
my @missing_auth_check; |
30 |
FILE: foreach my $file (@files) { |
31 |
FILE: foreach my $file (@files) { |
31 |
chomp $file; |
32 |
chomp $file; |
32 |
my @lines = read_file($file); |
33 |
my @lines = read_file($file); |
33 |
for my $line ( @lines ) { |
34 |
for my $line (@lines) { |
34 |
for my $routine ( qw( get_template_and_user check_cookie_auth checkauth check_api_auth C4::Service->init ) ) { |
35 |
for my $routine (qw( get_template_and_user check_cookie_auth checkauth check_api_auth C4::Service->init )) { |
35 |
next FILE if $line =~ m|^[^#]*$routine|; |
36 |
next FILE if $line =~ m|^[^#]*$routine|; |
36 |
} |
37 |
} |
37 |
} |
38 |
} |
38 |
- |
|
|