-
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.
Add description_label attribute to use a H1 other than DESCRIPTION
- Loading branch information
1 parent
7bd571e
commit 4e4e474
Showing
4 changed files
with
79 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
use strict; | ||
use warnings; | ||
|
||
use Test::More; | ||
|
||
# ABSTRACT: Basic Test | ||
|
||
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' => <<'EOF' ); | ||
package Foo; | ||
=head1 WHAT IS THIS | ||
This is a description | ||
=cut | ||
1; | ||
EOF | ||
|
||
$test->add_file( | ||
'dist.ini' => simple_ini( | ||
[ 'GatherDir' => {} ], # | ||
[ 'Readme::Brief' => { description_label => "WHAT IS THIS" } ], | ||
) | ||
); | ||
$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; | ||
|