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

(-)a/xt/tt_tidy.t (-5 / +12 lines)
Lines 19-24 use Modern::Perl; Link Here
19
use threads;    # used for parallel
19
use threads;    # used for parallel
20
use File::Slurp qw( read_file );
20
use File::Slurp qw( read_file );
21
use Test::More;
21
use Test::More;
22
use Test::NoWarnings;
22
use Test::Strict;
23
use Test::Strict;
23
use Parallel::ForkManager;
24
use Parallel::ForkManager;
24
use Sys::CPU;
25
use Sys::CPU;
Lines 39-54 if ( $ENV{KOHA_PROVE_CPUS} ) { Link Here
39
40
40
my $pm = Parallel::ForkManager->new($ncpu);
41
my $pm = Parallel::ForkManager->new($ncpu);
41
42
43
plan tests => scalar(@tt_files) + 1;
44
42
foreach my $filepath (@tt_files) {
45
foreach my $filepath (@tt_files) {
43
    $pm->start and next;
46
    $pm->start and next;
44
47
45
    my $tidy    = qx{perl misc/devel/tidy.pl --silent --no-write $filepath};
48
    if ( !-s $filepath ) {
46
    my $content = read_file $filepath;
49
47
    ok( $content eq $tidy, "$filepath should be kept tidy" );
50
        # Do not tidy empty files
51
        ok(1);
52
    } else {
53
        my $tidy    = qx{perl misc/devel/tidy.pl --silent --no-write $filepath};
54
        my $content = read_file $filepath;
55
        ok( $content eq $tidy, "$filepath should be kept tidy" );
56
    }
48
57
49
    $pm->finish;
58
    $pm->finish;
50
}
59
}
51
60
52
$pm->wait_all_children;
61
$pm->wait_all_children;
53
54
done_testing;
(-)a/xt/use-test-no-warnings.t (-4 lines)
Lines 46-54 my @exceptions = ( Link Here
46
46
47
    # bug 40449
47
    # bug 40449
48
    "xt/author/valid-templates.t",
48
    "xt/author/valid-templates.t",
49
50
    # bug 40315
51
    "xt/tt_tidy.t",
52
);
49
);
53
50
54
@t_files = array_minus( @t_files, @exceptions );
51
@t_files = array_minus( @t_files, @exceptions );
55
- 

Return to bug 40315