update diagnostic and release tets
This commit is contained in:
@@ -5,5 +5,5 @@ use Test::More tests => 1;
|
||||
SKIP: {
|
||||
eval q{ use Dist::Zilla::PluginBundle::Author::Plicease };
|
||||
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)
|
||||
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));
|
||||
|
||||
my @private_classes;
|
||||
|
||||
@@ -20,6 +20,8 @@ my $config;
|
||||
$config = LoadFile($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));
|
||||
|
||||
add_stopwords(@{ $config->{pod_spelling_system}->{stopwords} });
|
||||
@@ -29,6 +31,7 @@ all_pod_files_spelling_ok;
|
||||
__DATA__
|
||||
Plicease
|
||||
stdout
|
||||
stderr
|
||||
stdin
|
||||
subref
|
||||
loopback
|
||||
@@ -37,3 +40,62 @@ os
|
||||
Ollis
|
||||
Mojolicious
|
||||
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