Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for Module::Build support
- Loading branch information
1 parent
ed316af
commit f7a799f
Showing
3 changed files
with
54 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name = DZ3 | ||
version = 0.001 | ||
author = E. Xavier Ample <example@example.org> | ||
license = Perl_5 | ||
copyright_holder = E. Xavier Ample | ||
|
||
[@Filter] | ||
bundle = @FakeClassic | ||
remove = ConfirmRelease | ||
remove = FakeRelease | ||
remove = MakeMaker | ||
|
||
[ModuleBuild] | ||
[OSPrereqs / MSWin32] | ||
Win32API::File = 0.11 | ||
|
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,10 @@ | ||
use strict; | ||
use warnings; | ||
package DZ1; | ||
# ABSTRACT: this is a sample package for testing Dist::Zilla; | ||
|
||
sub main { | ||
return 1; | ||
} | ||
|
||
1; |
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,28 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use lib 't/lib'; | ||
|
||
use Test::More 0.88; | ||
use Path::Class; | ||
|
||
use Test::DZil; | ||
|
||
my $tzil = Builder->from_config( | ||
{ dist_root => 'corpus/DZ3' }, | ||
); | ||
|
||
$tzil->build; | ||
|
||
my $contents = $tzil->slurp_file('build/Build.PL'); | ||
|
||
my $conditional = q|if ( $^O eq 'MSWin32' ) {|; | ||
my $prereq = q|$module_build_args{requires}{'Win32API::File'} = '0.11'|; | ||
|
||
like($contents, qr/\Q$conditional\E.*?\Q$prereq\E.*?^\}/ms, "saw MSWin32 conditional"); | ||
|
||
my $meta = $tzil->slurp_file('build/META.yml'); | ||
like($meta, qr/dynamic_config: +1/, "dynamic_config is true in META.yml"); | ||
|
||
done_testing; | ||
|