1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
use strict;
use warnings;
use Test::More;
use Dist::Zilla::Util;
sub abstract_from_string {
my ($str) = @_;
my $e = Dist::Zilla::Util::PEA->_new;
$e->read_string($str);
return $e->{abstract};
}
{
my $pod = <<'EOP';
=head1 NAME
Term::ReadLine - Perl interface to various C<readline> packages.
If no real package is found, substitutes stubs instead of basic functions.
=head1 SYNOPSIS
EOP
is abstract_from_string($pod), 'Perl interface to various C<readline> packages. If no real package is found, substitutes stubs instead of basic functions.';
}
{
my $pod = <<'EOP';
=head1 NAME
Search::Dict, look - search for key in dictionary file
=head1 SYNOPSIS
EOP
is abstract_from_string($pod), 'search for key in dictionary file';
}
done_testing;
|