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 #403 from CPAN-API/file-lazy-default-indexed
Actually use "indexed:false" logic for common files
- Loading branch information
Showing
4 changed files
with
88 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
use Test::More; | ||
use strict; | ||
use warnings; | ||
|
||
use lib 't/lib'; | ||
use MetaCPAN::TestHelpers; | ||
|
||
test_release( | ||
{ | ||
name => 'Common-Files-1.1', | ||
author => 'BORISNAT', | ||
authorized => \1, | ||
first => \1, | ||
provides => ['Common::Files'], | ||
modules => { | ||
'lib/Common/Files.pm' => [ | ||
{ | ||
name => 'Common::Files', | ||
indexed => \1, | ||
authorized => \1, | ||
version => '1.1', | ||
version_numified => 1.1, | ||
associated_pod => | ||
'BORISNAT/Common-Files-1.1/lib/Common/Files.pm', | ||
}, | ||
], | ||
}, | ||
extra_tests => sub { | ||
my ($self) = @_; | ||
|
||
{ | ||
my $file = $self->file_by_path('Makefile.PL'); | ||
|
||
ok !$file->indexed, 'Makefile.PL not indexed'; | ||
ok $file->authorized, | ||
'Makefile.PL authorized, i suppose (not *un*authorized)'; | ||
is $file->sloc, 1, 'sloc'; | ||
is $file->slop, 3, 'slop'; | ||
|
||
is scalar( @{ $file->pod_lines } ), 1, 'one pod section'; | ||
|
||
is $file->abstract, undef, 'no abstract'; | ||
} | ||
|
||
}, | ||
} | ||
); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: Common-Files | ||
version: 1.1 | ||
abstract: Test common archive files | ||
|
||
X_Module_Faker: | ||
cpan_author: BORISNAT | ||
omitted_files: | ||
- Makefile.PL | ||
|
||
append: | ||
- | ||
file: lib/Common/Files.pm | ||
content: | | ||
=head1 NAME | ||
Common::Files - testing common files in a release | ||
=cut | ||
- | ||
file: Makefile.PL | ||
# NOTE: YAML::Tiny (CPAN::Meta::YAML) strips the blank lines. | ||
content: | | ||
print "hi"; | ||
=pod | ||
some pod | ||
=cut |