File: util.t

package info (click to toggle)
libdist-zilla-perl 6.033-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,928 kB
  • sloc: perl: 7,282; makefile: 4; sh: 1
file content (99 lines) | stat: -rw-r--r-- 1,494 bytes parent folder | download | duplicates (4)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
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->parse_string_document($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

=cut

# ABSTRACT: Decoy

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';
}

{
    my $pod = <<'EOP';
# ABSTRACT: Do stuff

=head1 NAME

Search::Dict - decoy

=head1 SYNOPSIS
EOP

    is abstract_from_string($pod), 'Do stuff';
}


{
    my $pod = <<'EOP';
=head1 NAME

retropan - Makes a historic minicpan E<9203> E<#9203> E<yuml> E<gt> E<lt> E<verbar> E<sol>

=head1 SYNOPSIS
EOP

    is abstract_from_string($pod), "Makes a historic minicpan \x{23f3} E<#9203> \x{ff} > < | /";
}

{
    my $pod = qq{
=head1 NAME

pound - latin1 \xa3

=head1 SYNOPSIS
};

    is abstract_from_string($pod), "latin1 \xa3";
}

{
    my $pod = qq{
=encoding utf8

=head1 NAME

pound - utf8 \xc2\xa3

=head1 SYNOPSIS
};

    is abstract_from_string($pod), "utf8 \xa3";
}


done_testing;