Bug 39319: Make podcorrectness.t test controller and test perl files

It only tested files within C4 and Koha directories.

Now we test all the perl files that are in the git index.

Test plan:
0. Do not apply those patches
1. prove xt/author/podcorrectness.t
Notice "Tests=1208" meaning that 1208 files are tested
2. Apply this patch (not the second one)
It fails, and more files are being tested (3254)
xt/author/podcorrectness.t .. 1994/3254
xt/author/podcorrectness.t .. 2726/3254 # Looks like you failed 1 test of 3254.
3. Apply the second patch
=> It passes!

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-03-13 09:47:27 +01:00 committed by Katrin Fischer
parent 64e51d89e1
commit 278de79e4a
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,4 @@
#!/usr/bin/env perl
use Modern::Perl;
=head2 podcorrectness.t
@ -8,16 +7,17 @@ correctness. It typically finds things like pod tags withouth blank
lines immediately before or after them, unknown directives, or =over,
=item, and =back in the wrong order.
You must have Test::Pod installed.
One good way to run this is with C<prove -v
xt/author/podcorrectness.t>
One good way to run this is with C<prove -v xt/author/podcorrectness.t>
=cut
use Modern::Perl;
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
my @poddirs = qw( C4 Koha );
all_pod_files_ok( all_pod_files(@poddirs) );
use Test::Pod;
my @files;
push @files, qx{git ls-files '*.pl' '*.PL' '*.pm' '*.t'};
push @files, qx{git ls-files svc opac/svc}; # Files without extension
chomp for @files;
all_pod_files_ok(@files);