Skip to content

Commit 0100da9

Browse files
vsespbLeont
authored andcommitted
pod main1 extensions - test current behaviour
1 parent 0a3ed90 commit 0100da9

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

t/manifypods.t

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ blib_load('Module::Build');
77
blib_load('Module::Build::ConfigData');
88

99
if ( Module::Build::ConfigData->feature('manpage_support') ) {
10-
plan tests => 21;
10+
plan tests => 33;
1111
} else {
1212
plan skip_all => 'manpage_support feature is not enabled';
1313
}
@@ -53,6 +53,22 @@ Simple Man <[email protected]>
5353
5454
=cut
5555
---
56+
57+
58+
for ([1 => ".pod"], [2 => ".pm"], [3 => ".pl"], [4 => ""]) { # array of _arrays_
59+
$dist->add_file( "docs/myapp$_->[0]$_->[1]", <<"---" );
60+
=head1 NAME
61+
62+
myapp$_->[0] - Pure POD
63+
64+
=head1 AUTHOR
65+
66+
Simple Man <simple\@example.com>
67+
68+
=cut
69+
1;
70+
---
71+
}
5672
$dist->regen;
5773

5874

@@ -65,6 +81,7 @@ my $destdir = catdir($cwd, 't', 'install_test' . $$);
6581
my $mb = Module::Build->new(
6682
module_name => $dist->name,
6783
install_base => $destdir,
84+
bindoc_dirs => ['bin', 'docs'],
6885
scripts => [ File::Spec->catfile( 'bin', 'nopod.pl' ),
6986
File::Spec->catfile( 'bin', 'haspod.pl' ) ],
7087

@@ -97,6 +114,10 @@ my %distro = (
97114
'lib/Simple.pm' => "Simple.$man{ext3}",
98115
'lib/Simple/NoPod.pm' => '',
99116
'lib/Simple/AllPod.pod' => "Simple$man{sep}AllPod.$man{ext3}",
117+
'docs/myapp1.pod' => "myapp1.pod.$man{ext1}",
118+
'docs/myapp2.pm' => "myapp2.pm.$man{ext1}",
119+
'docs/myapp3.pl' => "myapp3.pl.$man{ext1}",
120+
'docs/myapp4' => "myapp4.$man{ext1}",
100121
);
101122

102123
%distro = map {$mb->localize_file_path($_), $distro{$_}} keys %distro;

0 commit comments

Comments
 (0)