update diagnostic and release tets
This commit is contained in:
1 parent
9699560925
commit
c489fbc86e
6 files changed
+162
-8
No files matched your search
+34
-6
@@ -1,5 +1,6 @@
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
use Config;
|
||||||
use Test::More tests => 1;
|
use Test::More tests => 1;
|
||||||
BEGIN {
|
BEGIN {
|
||||||
my @modules;
|
my @modules;
|
||||||
@@ -18,6 +19,13 @@ BEGIN {
|
|||||||
eval qq{ require $_ } for @modules;
|
eval qq{ require $_ } for @modules;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sub spacer ()
|
||||||
|
{
|
||||||
|
diag '';
|
||||||
|
diag '';
|
||||||
|
diag '';
|
||||||
|
}
|
||||||
|
|
||||||
pass 'okay';
|
pass 'okay';
|
||||||
|
|
||||||
my @modules;
|
my @modules;
|
||||||
@@ -33,9 +41,30 @@ my $max = 1;
|
|||||||
$max = $_ > $max ? $_ : $max for map { length $_ } @modules;
|
$max = $_ > $max ? $_ : $max for map { length $_ } @modules;
|
||||||
our $format = "%-${max}s %s";
|
our $format = "%-${max}s %s";
|
||||||
|
|
||||||
diag '';
|
spacer;
|
||||||
diag '';
|
|
||||||
diag '';
|
my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV;
|
||||||
|
|
||||||
|
if(@keys > 0)
|
||||||
|
{
|
||||||
|
diag "$_=$ENV{$_}" for @keys;
|
||||||
|
|
||||||
|
if($ENV{PERL5LIB})
|
||||||
|
{
|
||||||
|
spacer;
|
||||||
|
diag "PERL5LIB path";
|
||||||
|
diag $_ for split $Config{path_sep}, $ENV{PERL5LIB};
|
||||||
|
|
||||||
|
}
|
||||||
|
elsif($ENV{PERLLIB})
|
||||||
|
{
|
||||||
|
spacer;
|
||||||
|
diag "PERLLIB path";
|
||||||
|
diag $_ for split $Config{path_sep}, $ENV{PERLLIB};
|
||||||
|
}
|
||||||
|
|
||||||
|
spacer;
|
||||||
|
}
|
||||||
|
|
||||||
diag sprintf $format, 'perl ', $^V;
|
diag sprintf $format, 'perl ', $^V;
|
||||||
|
|
||||||
@@ -56,6 +85,5 @@ foreach my $module (@modules)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
diag '';
|
spacer;
|
||||||
diag '';
|
|
||||||
diag '';
|
|
||||||
@@ -10,7 +10,6 @@ Mojolicious::Lite
|
|||||||
POSIX
|
POSIX
|
||||||
Template
|
Template
|
||||||
Template::Provider
|
Template::Provider
|
||||||
Test::CPAN::Meta
|
|
||||||
Test::Mojo
|
Test::Mojo
|
||||||
Test::More
|
Test::More
|
||||||
lib
|
lib
|
||||||
|
|||||||
@@ -5,5 +5,5 @@ use Test::More tests => 1;
|
|||||||
SKIP: {
|
SKIP: {
|
||||||
eval q{ use Dist::Zilla::PluginBundle::Author::Plicease };
|
eval q{ use Dist::Zilla::PluginBundle::Author::Plicease };
|
||||||
skip '[@Plicease] is not installed', 1 if $@;
|
skip '[@Plicease] is not installed', 1 if $@;
|
||||||
ok $Dist::Zilla::PluginBundle::Author::Plicease::VERSION >= 0.7, '[@Plicease] >= 0.7';
|
ok $Dist::Zilla::PluginBundle::Author::Plicease::VERSION >= 1.45, '[@Plicease] >= 1.45';
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,8 @@ my $config;
|
|||||||
$config = LoadFile($config_filename)
|
$config = LoadFile($config_filename)
|
||||||
if -r $config_filename;
|
if -r $config_filename;
|
||||||
|
|
||||||
|
plan skip_all => 'disabled' if $config->{pod_coverage}->{skip};
|
||||||
|
|
||||||
chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir));
|
chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir));
|
||||||
|
|
||||||
my @private_classes;
|
my @private_classes;
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ my $config;
|
|||||||
$config = LoadFile($config_filename)
|
$config = LoadFile($config_filename)
|
||||||
if -r $config_filename;
|
if -r $config_filename;
|
||||||
|
|
||||||
|
plan skip_all => 'disabled' if $config->{pod_spelling_system}->{skip};
|
||||||
|
|
||||||
chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir));
|
chdir(File::Spec->catdir($FindBin::Bin, File::Spec->updir, File::Spec->updir));
|
||||||
|
|
||||||
add_stopwords(@{ $config->{pod_spelling_system}->{stopwords} });
|
add_stopwords(@{ $config->{pod_spelling_system}->{stopwords} });
|
||||||
@@ -29,6 +31,7 @@ all_pod_files_spelling_ok;
|
|||||||
__DATA__
|
__DATA__
|
||||||
Plicease
|
Plicease
|
||||||
stdout
|
stdout
|
||||||
|
stderr
|
||||||
stdin
|
stdin
|
||||||
subref
|
subref
|
||||||
loopback
|
loopback
|
||||||
@@ -37,3 +40,62 @@ os
|
|||||||
Ollis
|
Ollis
|
||||||
Mojolicious
|
Mojolicious
|
||||||
plicease
|
plicease
|
||||||
|
CPAN
|
||||||
|
reinstall
|
||||||
|
TODO
|
||||||
|
filename
|
||||||
|
filenames
|
||||||
|
login
|
||||||
|
callback
|
||||||
|
callbacks
|
||||||
|
standalone
|
||||||
|
VMS
|
||||||
|
hostname
|
||||||
|
hostnames
|
||||||
|
TCP
|
||||||
|
UDP
|
||||||
|
IP
|
||||||
|
API
|
||||||
|
MSWin32
|
||||||
|
OpenBSD
|
||||||
|
FreeBSD
|
||||||
|
NetBSD
|
||||||
|
unencrypted
|
||||||
|
WebSocket
|
||||||
|
WebSockets
|
||||||
|
timestamp
|
||||||
|
timestamps
|
||||||
|
poney
|
||||||
|
BackPAN
|
||||||
|
portably
|
||||||
|
RedHat
|
||||||
|
AIX
|
||||||
|
BSD
|
||||||
|
XS
|
||||||
|
FFI
|
||||||
|
perlish
|
||||||
|
optimizations
|
||||||
|
subdirectory
|
||||||
|
RESTful
|
||||||
|
SQLite
|
||||||
|
JavaScript
|
||||||
|
dir
|
||||||
|
plugins
|
||||||
|
munge
|
||||||
|
jQuery
|
||||||
|
namespace
|
||||||
|
PDF
|
||||||
|
PDFs
|
||||||
|
usernames
|
||||||
|
DBI
|
||||||
|
pluggable
|
||||||
|
APIs
|
||||||
|
SSL
|
||||||
|
JSON
|
||||||
|
YAML
|
||||||
|
uncommented
|
||||||
|
Solaris
|
||||||
|
OpenVMS
|
||||||
|
URI
|
||||||
|
URL
|
||||||
|
CGI
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Test::More;
|
||||||
|
BEGIN { plan skip_all => 'test requires Test::Vars ' unless eval q{ use Test::Vars; 1 } }
|
||||||
|
BEGIN { plan skip_all => 'test requires Path::Class' unless eval q{ use Path::Class::Dir; 1 } }
|
||||||
|
BEGIN { plan skip_all => 'test requires YAML' unless eval q{ use YAML; 1 } }
|
||||||
|
|
||||||
|
my $dir = Path::Class::Dir->new(__FILE__)->parent->parent->parent;
|
||||||
|
my $config = YAML::LoadFile($dir->file(qw( xt release release.yml )));
|
||||||
|
|
||||||
|
plan skip_all => 'disabled' if $config->{unused_vars}->{skip};
|
||||||
|
|
||||||
|
my @modules;
|
||||||
|
recurse($dir->subdir('lib'));
|
||||||
|
|
||||||
|
sub recurse
|
||||||
|
{
|
||||||
|
my $dir = shift;
|
||||||
|
foreach my $child ($dir->children)
|
||||||
|
{
|
||||||
|
if($child->is_dir)
|
||||||
|
{
|
||||||
|
recurse($child);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
push @modules, $child if $child->basename =~ /\.pm$/;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
plan tests => scalar @modules;
|
||||||
|
|
||||||
|
my %global = (
|
||||||
|
ignore_vars => { map { $_ => 1 } @{ $config->{unused_vars}->{global}->{ignore_vars} } },
|
||||||
|
);
|
||||||
|
if(defined $config->{unused_vars}->{global}->{ignore_if})
|
||||||
|
{
|
||||||
|
$global{ignore_if} = eval $config->{unused_vars}->{global}->{ignore_if};
|
||||||
|
die $@ if $@;
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach my $file (@modules)
|
||||||
|
{
|
||||||
|
my @mod = $file->components;
|
||||||
|
shift @mod; # get rid of '.';
|
||||||
|
shift @mod; # get rid of 'lib';
|
||||||
|
$mod[-1] =~ s/\.pm$//;
|
||||||
|
my $mod = join '::', @mod;
|
||||||
|
|
||||||
|
my %local = %global;
|
||||||
|
foreach my $ignore (@{ $config->{unused_vars}->{module}->{$mod}->{ignore_vars} || []})
|
||||||
|
{
|
||||||
|
$local{ignore_vars}->{$ignore} = 1;
|
||||||
|
}
|
||||||
|
if(defined $config->{unused_vars}->{module}->{$mod}->{ignore_if})
|
||||||
|
{
|
||||||
|
$local{ignore_if} = eval $config->{unused_vars}->{module}->{$mod}->{ignore_if};
|
||||||
|
die $@ if $@;
|
||||||
|
}
|
||||||
|
|
||||||
|
vars_ok($file, %local);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user