diff options
author | 2017-02-05 00:31:51 +0000 | |
---|---|---|
committer | 2017-02-05 00:31:51 +0000 | |
commit | b8851fcc53cbe24fd20b090f26dd149e353f6174 (patch) | |
tree | 4b7c1695865f00ab7a0da30b5632d514848ea3a2 /gnu/usr.bin/perl/cpan/Module-Build/t/pod_parser.t | |
parent | Add option PCIVERBOSE. (diff) | |
download | wireguard-openbsd-b8851fcc53cbe24fd20b090f26dd149e353f6174.tar.xz wireguard-openbsd-b8851fcc53cbe24fd20b090f26dd149e353f6174.zip |
Fix merge issues, remove excess files - match perl-5.24.1 dist
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Build/t/pod_parser.t')
-rwxr-xr-x | gnu/usr.bin/perl/cpan/Module-Build/t/pod_parser.t | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/gnu/usr.bin/perl/cpan/Module-Build/t/pod_parser.t b/gnu/usr.bin/perl/cpan/Module-Build/t/pod_parser.t deleted file mode 100755 index d4ebcdc91d2..00000000000 --- a/gnu/usr.bin/perl/cpan/Module-Build/t/pod_parser.t +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/perl -w - -use strict; -use lib 't/lib'; -use MBTest tests => 14; - -blib_load('Module::Build::PodParser'); - -######################### - -{ - package IO::StringBased; - - sub TIEHANDLE { - my ($class, $string) = @_; - return bless { - data => [ map "$_\n", split /\n/, $string], - }, $class; - } - - sub READLINE { - shift @{ shift()->{data} }; - } -} - -local *FH; -tie *FH, 'IO::StringBased', <<'EOF'; -=head1 NAME - -Foo::Bar - Perl extension for blah blah blah - -=head1 AUTHOR - -C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004. - -Home page: http://example.com/~eh/ - -=cut -EOF - - -my $pp = Module::Build::PodParser->new(fh => \*FH); -ok $pp, 'object created'; - -is $pp->get_author->[0], 'C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004.', 'author'; -is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract'; - - -{ - # Try again without a valid author spec - untie *FH; - tie *FH, 'IO::StringBased', <<'EOF'; -=head1 NAME - -Foo::Bar - Perl extension for blah blah blah - -=cut -EOF - - my $pp = Module::Build::PodParser->new(fh => \*FH); - ok $pp, 'object created'; - - is_deeply $pp->get_author, [], 'author'; - is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract'; -} - - -{ - # Try again with mixed-case =head1s. - untie *FH; - tie *FH, 'IO::StringBased', <<'EOF'; -=head1 Name - -Foo::Bar - Perl extension for blah blah blah - -=head1 Author - -C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004. - -Home page: http://example.com/~eh/ - -=cut -EOF - - my $pp = Module::Build::PodParser->new(fh => \*FH); - ok $pp, 'object created'; - - is $pp->get_author->[0], 'C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004.', 'author'; - is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract'; -} - - -{ - # Now with C<Module::Name> - untie *FH; - tie *FH, 'IO::StringBased', <<'EOF'; -=head1 Name - -C<Foo::Bar> - Perl extension for blah blah blah - -=head1 Author - -C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004. - -Home page: http://example.com/~eh/ - -=cut -EOF - - my $pp = Module::Build::PodParser->new(fh => \*FH); - ok $pp, 'object created'; - - is $pp->get_author->[0], 'C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004.', 'author'; - is $pp->get_abstract, 'Perl extension for blah blah blah', 'abstract'; -} - -{ -local *FH; -tie *FH, 'IO::StringBased', <<'EOF'; -=head1 NAME - -Foo_Bar - Perl extension for eating pie - -=head1 AUTHOR - -C<Foo_Bar> was written by Engelbert Humperdinck I<E<lt>eh@example.comE<gt>> in 2004. - -Home page: http://example.com/~eh/ - -=cut -EOF - - - my $pp = Module::Build::PodParser->new(fh => \*FH); - ok $pp, 'object created'; - is $pp->get_abstract, 'Perl extension for eating pie', 'abstract'; -} |