diff --git a/xt/tt_tidy.t b/xt/tt_tidy.t index 895c26be7d..c5e3ecbae1 100755 --- a/xt/tt_tidy.t +++ b/xt/tt_tidy.t @@ -19,6 +19,7 @@ use Modern::Perl; use threads; # used for parallel use File::Slurp qw( read_file ); use Test::More; +use Test::NoWarnings; use Test::Strict; use Parallel::ForkManager; use Sys::CPU; @@ -39,16 +40,22 @@ if ( $ENV{KOHA_PROVE_CPUS} ) { my $pm = Parallel::ForkManager->new($ncpu); +plan tests => scalar(@tt_files) + 1; + foreach my $filepath (@tt_files) { $pm->start and next; - my $tidy = qx{perl misc/devel/tidy.pl --silent --no-write $filepath}; - my $content = read_file $filepath; - ok( $content eq $tidy, "$filepath should be kept tidy" ); + if ( !-s $filepath ) { + + # Do not tidy empty files + ok(1); + } else { + my $tidy = qx{perl misc/devel/tidy.pl --silent --no-write $filepath}; + my $content = read_file $filepath; + ok( $content eq $tidy, "$filepath should be kept tidy" ); + } $pm->finish; } $pm->wait_all_children; - -done_testing; diff --git a/xt/use-test-no-warnings.t b/xt/use-test-no-warnings.t index 621dac817f..dc1c306b68 100755 --- a/xt/use-test-no-warnings.t +++ b/xt/use-test-no-warnings.t @@ -46,9 +46,6 @@ my @exceptions = ( # bug 40449 "xt/author/valid-templates.t", - - # bug 40315 - "xt/tt_tidy.t", ); @t_files = array_minus( @t_files, @exceptions );