Dist-Zilla-Plugin-Conflicts
view release on metacpan or search on metacpan
t/01-basic.t view on Meta::CPAN
use strict;
use warnings;
use File::pushd qw( pushd );
use Path::Tiny;
use Test::DZil;
use Test::Deep;
use Test::Differences;
use Test::Fatal;
use Test::More;
use if $ENV{AUTHOR_TESTING}, 'Test::Warnings';
my $tzil = Builder->from_config(
{ dist_root => 't/does-not-exist' },
{
add_files => {
path(qw( source dist.ini )) => simple_ini(
[ GatherDir => ],
[ MakeMaker => ],
[ ExecDir => ],
[ Prereqs => { 'Foo' => '0' } ],
[
'Conflicts' => {
-script => 'script/dzt-conflicts',
'Module::X' => '0.02'
}
],
),
path(qw( source lib DZT Sample.pm )) =>
"package DZT::Sample;\n1;\n",
},
},
);
$tzil->chrome->logger->set_debug(1);
is(
exception { $tzil->build() },
undef,
'build proceeds normally',
);
cmp_deeply(
$tzil->distmeta,
superhashof(
{
prereqs => {
configure => {
requires => {
'Dist::CheckConflicts' => '0.02',
'ExtUtils::MakeMaker' =>
ignore, # added by [MakeMaker]
}
},
runtime => {
requires => {
'Dist::CheckConflicts' => '0.02',
'Foo' => '0',
},
},
},
}
),
'prereqs are injected',
) or diag 'got distmeta: ', explain $tzil->distmeta();
my $build_dir = path( $tzil->tempdir )->child('build');
my $module_filename = $build_dir->child(qw( lib DZT Sample Conflicts.pm ));
( run in 0.658 second using v1.01-cache-2.11-cpan-39bf76dae61 )