-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #243 from skaji/locate_dependency_file
try to load initial requirements from Build.PL/Makefile.PL too
- Loading branch information
Showing
5 changed files
with
170 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
use strict; | ||
use warnings; | ||
use Test::More; | ||
|
||
use lib "xt/lib"; | ||
use CLI; | ||
use Path::Tiny; | ||
use File::pushd 'tempd'; | ||
|
||
subtest build_pl => sub { | ||
my $guard = tempd; | ||
with_same_local { | ||
cpm_install 'Module::Build'; | ||
|
||
Path::Tiny->new("Build.PL")->spew(<<'EOF'); | ||
use Module::Build; | ||
my $builder = Module::Build->new( | ||
module_name => 'TEST_MODULE', | ||
dist_version => '0.1', | ||
dist_author => 'skaji', | ||
dist_abstract => 'test', | ||
no_index => {}, | ||
requires => { 'File::pushd' => 0 }, | ||
); | ||
$builder->create_build_script; | ||
EOF | ||
my $r = cpm_install; | ||
like $r->err, qr/Executing Build.PL/; | ||
like $r->err, qr/DONE install File-pushd-/; | ||
}; | ||
}; | ||
|
||
subtest makefile_pl => sub { | ||
my $guard = tempd; | ||
Path::Tiny->new("Makefile.PL")->spew(<<'EOF'); | ||
use ExtUtils::MakeMaker; | ||
WriteMakefile( | ||
NAME => 'TEST_MODULE', | ||
PREREQ_PM => { 'File::pushd' => 0 }, | ||
); | ||
EOF | ||
my $r = cpm_install; | ||
like $r->err, qr/Executing Makefile.PL/; | ||
like $r->err, qr/DONE install File-pushd-/; | ||
}; | ||
|
||
done_testing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters