-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build results of 2a9e822 (on future-2.002002)
- Loading branch information
1 parent
ad5f72e
commit 433f1f8
Showing
5 changed files
with
92 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
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,75 @@ | ||
|
||
use strict; | ||
use warnings; | ||
|
||
use Test::More 0.96; | ||
use Test::Fatal; | ||
use Path::Tiny qw( path ); | ||
use Test::DZil qw( simple_ini Builder ); | ||
|
||
{ | ||
package # PAUSE | ||
Dist::Zilla::Plugin::FakePlugin; | ||
|
||
use Moose; | ||
use Dist::Zilla::MetaProvides::ProvideRecord; | ||
|
||
with 'Dist::Zilla::Role::Plugin'; | ||
with 'Dist::Zilla::Role::MetaProvider::Provider'; | ||
|
||
sub provides { | ||
my $self = shift; | ||
return $self->_apply_meta_noindex( | ||
Dist::Zilla::MetaProvides::ProvideRecord->new( | ||
module => 'FakeModule', | ||
file => 'C:\temp\notevenonwindows.pl', | ||
version => '3.1414', | ||
parent => $self, | ||
), | ||
Dist::Zilla::MetaProvides::ProvideRecord->new( | ||
module => 'Example', | ||
file => 'lib/Example.pm', | ||
version => '3.1414', | ||
parent => $self, | ||
), | ||
Dist::Zilla::MetaProvides::ProvideRecord->new( | ||
module => 'Example::Hidden', | ||
file => 'lib/Example.pm', | ||
version => '3.1414', | ||
parent => $self, | ||
), | ||
|
||
); | ||
} | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
$INC{'Dist/Zilla/Plugin/FakePlugin.pm'} = 1; | ||
} | ||
|
||
my $test_module = <<'EOF'; | ||
package Example; | ||
1; | ||
EOF | ||
|
||
my $builder = Builder->from_config( | ||
{ | ||
dist_root => 'invalid', | ||
}, | ||
{ | ||
add_files => { | ||
path('source/dist.ini') => simple_ini( 'GatherDir', [ 'FakePlugin' => { meta_noindex => 1 } ] ), | ||
path('source/lib/Example.pm') => $test_module, | ||
}, | ||
}, | ||
); | ||
|
||
$builder->chrome->logger->set_debug(1); | ||
$builder->build; | ||
|
||
ok( ( grep { /for module <Fake/ } @{ $builder->log_messages } ), "Fake namespace without matching file warned" ); | ||
ok( !( grep { /for module <Example>/ } @{ $builder->log_messages } ), "Example with matching file doesnt warn" ); | ||
ok( ( grep { /for module <Example::Hidden>/ } @{ $builder->log_messages } ), "Example::Hidden cuckoo warns" ); | ||
|
||
note explain $builder->log_messages; | ||
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