Dist-Zilla-PluginBundle-Author-ETHER
view release on metacpan or search on metacpan
t/16-podweaver-licence.t view on Meta::CPAN
use strict;
use warnings;
use Test::More 0.96;
use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
use Test::DZil;
use Test::Fatal;
use Test::Deep;
use Path::Tiny;
use PadWalker 'closed_over';
use Test::File::ShareDir -share => { -dist => { 'Dist-Zilla-PluginBundle-Author-ETHER' => 'share' } };
use lib 't/lib';
use Helper;
use NoNetworkHits;
use NoPrereqChecks;
my @tests = (
{
expected_file => 'LICENCE',
config => {},
},
{
expected_file => 'LICENCE',
config => { licence => 'LICENCE' },
},
{
expected_file => 'LICENCE',
config => { 'License.filename' => 'LICENCE' },
},
{
expected_file => 'LICENCE',
config => { authority => 'cpan:ETHER' },
},
{
expected_file => 'LICENSE',
config => { licence => 'LICENSE' },
},
{
expected_file => 'LICENSE',
config => { 'License.filename' => 'LICENSE' },
},
{
expected_file => 'LICENSE',
config => { authority => 'cpan:OTHERDUDE' },
},
{
expected_file => 'LICENCE',
config => { authority => 'cpan:BOBTFISH' },
},
);
subtest "expecting $_->{expected_file} from config: " . join(' => ', %{ $_->{config} }) => sub {
my $expected_file = $_->{expected_file};
my $config = $_->{config};
my $tempdir = no_git_tempdir();
my $tzil = Builder->from_config(
{ dist_root => 'does-not-exist' },
{
tempdir_root => $tempdir->stringify,
add_files => {
path(qw(source dist.ini)) => simple_ini(
{ # merge into root section
version => '0.005',
},
'GatherDir',
[ '@Author::ETHER' => {
( run in 2.369 seconds using v1.01-cache-2.11-cpan-364913b4093 )