Bug 40444: Add Test::NoWarnings to xt tests
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 40d3fe470e)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
This commit is contained in:
parent
319d6f88cd
commit
d57bfdbaf5
|
|
@ -24,7 +24,8 @@ use Modern::Perl;
|
|||
use open OUT => ':encoding(UTF-8)', ':std';
|
||||
use utf8;
|
||||
|
||||
use Test::More tests => 22;
|
||||
use Test::More tests => 23;
|
||||
use Test::NoWarnings;
|
||||
use Text::CSV;
|
||||
use Text::CSV_XS;
|
||||
use File::Find;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
use Modern::Perl;
|
||||
use Test::PerlTidy;
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
use Koha::Devel::Files;
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ push @files, $dev_files->ls_perl_files;
|
|||
push @files, $dev_files->ls_tt_files;
|
||||
push @files, $dev_files->ls_js_files;
|
||||
|
||||
plan tests => scalar @files;
|
||||
plan tests => scalar(@files) + 1;
|
||||
|
||||
for my $file (@files) {
|
||||
my $output = qx{codespell -d --ignore-words .codespell-ignore $file};
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ use lib qw( .. );
|
|||
|
||||
use Data::Dumper;
|
||||
use File::Find;
|
||||
use Test::More tests => 3;
|
||||
use Test::More tests => 4;
|
||||
use Test::NoWarnings;
|
||||
|
||||
# hardcoded OPAC & STAFF dirs
|
||||
my $opac_dir = 'koha-tmpl/opac-tmpl';
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More;
|
||||
plan tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use Test::NoWarnings;
|
||||
|
||||
use File::Spec;
|
||||
use File::Slurp qw( read_file );
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
use Modern::Perl;
|
||||
use File::Find;
|
||||
use Data::Dumper;
|
||||
use Test::More tests => 1;
|
||||
use Test::More tests => 2;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my @files;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More;
|
||||
use Test::More tests => 2;
|
||||
use Test::NoWarnings;
|
||||
|
||||
use File::Slurp qw(read_file);
|
||||
|
||||
|
|
@ -39,4 +40,3 @@ FILE: foreach my $file (@files) {
|
|||
push @missing_auth_check, $file;
|
||||
}
|
||||
is( scalar @missing_auth_check, 0 ) or diag "No auth check in the following files:\n" . join "\n", @missing_auth_check;
|
||||
done_testing;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use Test::NoWarnings;
|
||||
use File::Slurp;
|
||||
use Data::Dumper;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use Test::NoWarnings;
|
||||
use File::Slurp qw( read_file );
|
||||
use Data::Dumper;
|
||||
use t::lib::QA::TemplateFilters;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use Test::NoWarnings;
|
||||
use File::Slurp;
|
||||
use Data::Dumper;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@
|
|||
use Modern::Perl;
|
||||
use File::Slurp qw( read_file );
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my @js_files = qx{git ls-files '*.js' '*.ts'};
|
||||
|
||||
plan tests => scalar @js_files;
|
||||
plan tests => scalar(@js_files) + 1;
|
||||
|
||||
foreach my $filepath (@js_files) {
|
||||
chomp $filepath;
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
use Modern::Perl;
|
||||
use Test::PerlTidy;
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
use Koha::Devel::Files;
|
||||
|
||||
my $dev_files = Koha::Devel::Files->new( { context => 'tidy' } );
|
||||
my @files = $dev_files->ls_perl_files;
|
||||
|
||||
plan tests => scalar @files;
|
||||
plan tests => scalar(@files) + 1;
|
||||
|
||||
for my $file (@files) {
|
||||
ok( Test::PerlTidy::is_file_tidy($file) );
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
# along with Koha; if not, see <http://www.gnu.org/licenses>.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use Test::NoWarnings;
|
||||
use File::Slurp qw( read_file );
|
||||
|
||||
use Koha::Devel::Files;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use Test::NoWarnings;
|
|||
|
||||
use Array::Utils qw( array_minus );
|
||||
|
||||
my @t_files = qx{git grep --files-without-match "Test::NoWarnings" 't/*.t'};
|
||||
my @t_files = qx{git grep --files-without-match "Test::NoWarnings" 't/*.t' 'xt/*.t'};
|
||||
chomp for @t_files;
|
||||
|
||||
my @exceptions = (
|
||||
|
|
@ -46,6 +46,15 @@ my @exceptions = (
|
|||
|
||||
# bug 40443
|
||||
"t/db_dependent/cronjobs/advance_notices_digest.t",
|
||||
|
||||
# Cannot be removed
|
||||
"xt/author/podcorrectness.t",
|
||||
|
||||
# bug 40449
|
||||
"xt/author/valid-templates.t",
|
||||
|
||||
# bug 40315
|
||||
"xt/tt_tidy.t",
|
||||
);
|
||||
|
||||
@t_files = array_minus( @t_files, @exceptions );
|
||||
|
|
|
|||
|
|
@ -21,12 +21,15 @@
|
|||
# generates the koha-common man pages and ensures they're correct.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More qw(no_plan);
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my $doc_dir = 'debian/docs';
|
||||
my @doc_files = glob( $doc_dir . '/*.xml' );
|
||||
my @command = qw(xmllint --noout);
|
||||
|
||||
plan tests => scalar(@doc_files) + 1;
|
||||
|
||||
foreach my $file (@doc_files) {
|
||||
ok( system( @command, $file ) == 0, "XML validation for $file" );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,8 @@
|
|||
# 'git commit ./yarn.lock'.
|
||||
|
||||
use Modern::Perl;
|
||||
use Test::More tests => 1;
|
||||
use Test::More tests => 2;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my $rc;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
|
||||
use Modern::Perl;
|
||||
|
||||
use Test::More tests => 2;
|
||||
use Test::More tests => 3;
|
||||
use Test::NoWarnings;
|
||||
|
||||
foreach my $record_type (qw( biblios authorities )) {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@
|
|||
use Modern::Perl;
|
||||
use File::Slurp qw( read_file );
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my @vue_files = `git ls-files 'koha-tmpl/intranet-tmpl/prog/js/vue/*.vue'`;
|
||||
|
||||
plan tests => scalar @vue_files;
|
||||
plan tests => scalar(@vue_files) + 1;
|
||||
|
||||
foreach my $filepath (@vue_files) {
|
||||
chomp $filepath;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ use File::Find;
|
|||
use FindBin ();
|
||||
|
||||
use Test::More;
|
||||
use Test::NoWarnings;
|
||||
|
||||
my $filebase = "$FindBin::Bin/../koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences";
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ sub wanted {
|
|||
}
|
||||
find( { wanted => \&wanted, no_chdir => 1 }, $filebase );
|
||||
|
||||
plan tests => scalar @files;
|
||||
plan tests => scalar(@files) + 1;
|
||||
|
||||
foreach my $f (@files) {
|
||||
chomp $f;
|
||||
|
|
|
|||
Loading…
Reference in New Issue