Line 0
Link Here
|
0 |
- |
1 |
#/usr/bin/perl |
|
|
2 |
|
3 |
# This file is part of Koha. |
4 |
# |
5 |
# Koha is free software; you can redistribute it and/or modify it |
6 |
# under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 3 of the License, or |
8 |
# (at your option) any later version. |
9 |
# |
10 |
# Koha is distributed in the hope that it will be useful, but |
11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
14 |
# |
15 |
# You should have received a copy of the GNU General Public License |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
17 |
|
18 |
use Modern::Perl; |
19 |
use Test::More tests => 2; |
20 |
use Test::NoWarnings; |
21 |
|
22 |
use Array::Utils qw( array_minus ); |
23 |
|
24 |
my @t_files = qx{git grep --files-without-match "Test::NoWarnings" 't/*.t'}; |
25 |
chomp for @t_files; |
26 |
|
27 |
my @exceptions = ( |
28 |
|
29 |
# Cannot be removed |
30 |
"t/00-testcritic.t", |
31 |
|
32 |
# bug 40386 |
33 |
"t/Edifact.t", |
34 |
|
35 |
# bug 40387 |
36 |
"t/db_dependent/Koha/EDI.t", |
37 |
|
38 |
# bug 40382 |
39 |
"t/db_dependent/Koha/CoverImages.t", |
40 |
|
41 |
# bug 40442 |
42 |
"t/db_dependent/Koha/MarcOrder.t", |
43 |
|
44 |
# bug 40375 |
45 |
"t/db_dependent/XISBN.t", |
46 |
|
47 |
# bug 40443 |
48 |
"t/db_dependent/cronjobs/advance_notices_digest.t", |
49 |
); |
50 |
|
51 |
@t_files = array_minus( @t_files, @exceptions ); |
52 |
is( scalar(@t_files), 0, "All Perl test files should contain Test::NoWarnings" ) |
53 |
or diag( sprintf "The following test files should use Test::NoWarnings:\n\t%s", join "\n\t", @t_files ); |
54 |
|