Bug 39325: Add test

We certainly want to improve this test and run it in parallel.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-03-13 15:49:11 +01:00 committed by Katrin Fischer
parent 81869ff48d
commit ea832ff246
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 21 additions and 0 deletions

21
xt/author/codespell.t Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/perl
use Modern::Perl;
use Test::PerlTidy;
use Test::More;
my @files;
push @files,
qx{git ls-files '*.pl' '*.PL' '*.pm' '*.t' ':(exclude)installer/data/mysql/updatedatabase.pl' ':(exclude)installer/data/mysql/update22to30.pl' ':(exclude)misc/cronjobs/build_browser_and_cloud.pl'};
push @files, qx{git ls-files svc opac/svc}; # Files without extension
push @files, qx{git ls-files '*.tt' '*.inc'};
push @files,
qx{git ls-files '*.js' '*.ts' '*.vue' ':(exclude)koha-tmpl/intranet-tmpl/lib' ':(exclude)koha-tmpl/intranet-tmpl/js/Gettext.js' ':(exclude)koha-tmpl/opac-tmpl/lib' ':(exclude)koha-tmpl/opac-tmpl/bootstrap/js/Gettext.js'};
plan tests => scalar @files;
for my $file (@files) {
chomp $file;
my $output = qx{codespell -d --ignore-words .codespell-ignore $file};
chomp $output;
is( $output, q{} );
}