View | Details | Raw Unified | Return to bug 29324
Collapse All | Expand All

(-)a/xt/find-license-problems.t (-3 / +3 lines)
Lines 44-50 find({ wanted => \&wanted, no_chdir => 1 }, File::Spec->curdir()); Link Here
44
foreach my $name (@files) {
44
foreach my $name (@files) {
45
    open( my $fh, '<', $name ) || die "cannot open file $name $!";
45
    open( my $fh, '<', $name ) || die "cannot open file $name $!";
46
    my ( $hascopyright, $hasgpl, $hasv3, $hasorlater, $haslinktolicense,
46
    my ( $hascopyright, $hasgpl, $hasv3, $hasorlater, $haslinktolicense,
47
        $hasfranklinst, $is_not_us ) = (0)x7;
47
        $hasfranklinst, $is_not_us, $needs_copyright ) = (0)x8;
48
    while ( my $line = <$fh> ) {
48
    while ( my $line = <$fh> ) {
49
        $hascopyright = 1 if ( $line =~ /^(#|--)?\s*Copyright.*\d\d/ );
49
        $hascopyright = 1 if ( $line =~ /^(#|--)?\s*Copyright.*\d\d/ );
50
        $hasgpl       = 1 if ( $line =~ /GNU General Public License/ );
50
        $hasgpl       = 1 if ( $line =~ /GNU General Public License/ );
Lines 55-63 foreach my $name (@files) { Link Here
55
        $haslinktolicense = 1 if $line =~ m|http://www\.gnu\.org/licenses|;
55
        $haslinktolicense = 1 if $line =~ m|http://www\.gnu\.org/licenses|;
56
        $hasfranklinst    = 1 if ( $line =~ /51 Franklin Street/ );
56
        $hasfranklinst    = 1 if ( $line =~ /51 Franklin Street/ );
57
        $is_not_us        = 1 if $line =~ m|This file is part of the Zebra server|;
57
        $is_not_us        = 1 if $line =~ m|This file is part of the Zebra server|;
58
        $needs_copyright  = 1 if $line =~ m|This file is part of Koha|;
58
    }
59
    }
59
    close $fh;
60
    close $fh;
60
    next unless $hascopyright;
61
    next unless $hascopyright || $needs_copyright;
61
    next if $is_not_us;
62
    next if $is_not_us;
62
    is(    $hasgpl
63
    is(    $hasgpl
63
        && $hasv3
64
        && $hasv3
64
- 

Return to bug 29324