Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
91 additions
and
1 deletion.
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,18 @@ | ||
name = DZ4 | ||
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 | ||
|
||
[ModuleBuild] | ||
[OSPrereqs / !MSWin32] | ||
Proc::ProcessTable = 0.50 | ||
[OSPrereqs / ~foo] | ||
Acme::One = 0.01 | ||
[OSPrereqs / !~bar] | ||
Acme::Two = 0.02 |
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 DZ4; | ||
# 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
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,38 @@ | ||
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/DZ4' }, | ||
); | ||
|
||
$tzil->build; | ||
|
||
my $contents = $tzil->slurp_file('build/Makefile.PL'); | ||
|
||
{ | ||
my $conditional = q|if ( $^O ne 'MSWin32' ) {|; | ||
my $prereq = q|$WriteMakefileArgs{PREREQ_PM}{'Proc::ProcessTable'} = '0.50'|; | ||
like($contents, qr/\Q$conditional\E.*?\Q$prereq\E.*?^\}/ms, "saw !prefix conditional"); | ||
} | ||
|
||
{ | ||
my $conditional = q|if ( $^O =~ /foo/i ) {|; | ||
my $prereq = q|$WriteMakefileArgs{PREREQ_PM}{'Acme::One'} = '0.01'|; | ||
like($contents, qr/\Q$conditional\E.*?\Q$prereq\E.*?^\}/ms, "saw ~prefix conditional"); | ||
} | ||
|
||
{ | ||
my $conditional = q|if ( $^O !~ /bar/i ) {|; | ||
my $prereq = q|$WriteMakefileArgs{PREREQ_PM}{'Acme::Two'} = '0.02'|; | ||
like($contents, qr/\Q$conditional\E.*?\Q$prereq\E.*?^\}/ms, "saw !~prefix conditional"); | ||
} | ||
|
||
done_testing; | ||
|