plan
tests
=> 3;
blib_load(
'Module::Build'
);
my
$dist
= DistGen->new->chdir_in;
$dist
->add_file(
'mylib/MBUtil.pm'
, <<
"---"
);
sub
foo { 42 }
1;
---
$dist
->add_file(
'Build.PL'
, <<
"---"
);
die
unless
MBUtil::foo() == 42;
my
\
$builder
= Module::Build->new(
module_name
=>
'$dist->{name}'
,
license
=>
'perl'
,
);
\
$builder
->create_build_script();
---
$dist
->regen;
my
$mb
=
$dist
->new_from_context();
isa_ok(
$mb
,
"Module::Build"
);
is(
$mb
->dist_name,
"Simple"
,
"dist_name is 'Simple'"
);
ok( (
grep
{ /mylib/ }
@INC
),
"resume added \@INC addition to \@INC"
);