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

(-)a/xt/find-license-problems.t (-4 / +4 lines)
Lines 55-69 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
        $needs_copyright  = 1 if $line =~ m|This file is part of Koha| || $name =~ /(.*).pl/ || $name =~ /(.*).pm/;
59
    }
59
    }
60
    close $fh;
60
    close $fh;
61
    next unless $hascopyright || $needs_copyright;
61
    next unless $hascopyright || $needs_copyright;
62
    next if $is_not_us;
62
    next if $is_not_us;
63
    is(    $hasgpl
63
    is(    $hascopyright
64
        && $hasgpl
64
        && $hasv3
65
        && $hasv3
65
        && $hasorlater
66
        && $hasorlater
66
        && $haslinktolicense
67
        && $haslinktolicense
67
        && !$hasfranklinst,  1 ) or diag(sprintf "File %s has wrong copyright: hasgpl=%s, hasv3=%s, hasorlater=%s, haslinktolicense=%s, hasfranklinst=%s", $name, $hasgpl, $hasv3, $hasorlater, $haslinktolicense, $hasfranklinst);
68
        && !$hasfranklinst,  1 ) or diag(sprintf "File %s has wrong copyright: hascopyright=%s, hasgpl=%s, hasv3=%s, hasorlater=%s, haslinktolicense=%s, hasfranklinst=%s", $name, $hascopyright, $hasgpl, $hasv3, $hasorlater, $haslinktolicense, $hasfranklinst);
68
}
69
}
69
done_testing;
70
done_testing;
70
- 

Return to bug 29324