-
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.
automatically use .pod placed next to main_module
- Loading branch information
1 parent
b33895e
commit 450b483
Showing
6 changed files
with
55 additions
and
5 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
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,41 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
|
||
# ABSTRACT: Basic Test for documentation in .pod | ||
|
||
use Dist::Zilla::Util::Test::KENTNL 1.004 qw( dztest ); | ||
use Test::DZil qw( simple_ini ); | ||
|
||
my $test = dztest(); | ||
$test->add_file( 'lib/Example.pm' => 1 ); | ||
$test->add_file( 'lib/Example.pod' => <<'EOF' ); | ||
# PODNAME: Foo | ||
=head1 DESCRIPTION | ||
This is a description | ||
=cut | ||
1; | ||
EOF | ||
|
||
$test->add_file( 'dist.ini' => simple_ini( [ 'GatherDir' => {} ], [ 'Readme::Brief' => {} ], ) ); | ||
$test->build_ok; | ||
|
||
my $src_file = $test->test_has_built_file('README'); | ||
my @lines = $src_file->lines_utf8( { chomp => 1 } ); | ||
|
||
use List::Util qw( first ); | ||
|
||
ok( ( first { $_ eq 'Foo' } @lines ), 'Document name found and injected' ); | ||
ok( ( first { $_ eq 'This is a description' } @lines ), 'Description injected' ); | ||
ok( ( first { $_ eq 'INSTALLATION' } @lines ), 'Installation section injected' ); | ||
ok( ( first { $_ eq 'COPYRIGHT AND LICENSE' } @lines ), 'Copyright section injected' ); | ||
|
||
done_testing; | ||
|