summaryrefslogtreecommitdiff
path: root/cpan/ExtUtils-MakeMaker/t/parse_abstract.t
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-08-24 19:21:23 +0100
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-08-24 19:21:23 +0100
commit9b47cddefd9b4a322e6382c8979ceeb2c3ac25c9 (patch)
treea38c68659eb1f6fea37bb1826180d60362fd4a78 /cpan/ExtUtils-MakeMaker/t/parse_abstract.t
parent766ce144fedc77f5b0e36ad3461d0af412fd35e2 (diff)
downloadperl-9b47cddefd9b4a322e6382c8979ceeb2c3ac25c9.tar.gz
Update ExtUtils-MakeMaker to CPAN version 6.57_01
[DELTA] 6.57_01 Tue Aug 24 01:36:20 PDT 2010 Improvements * parse_abstract() is more robust supporting "Package.pm" and multiple dashes and spaces. [rt.perl.org 74438] Bug Fixes * Recognize .so files in AIX. [rt.cpan.org 41360] (Jens Rehsack) * Remove manual image-base generation on Win32/gcc [rt.cpan.org 47138] (Yasuhiro Matsumoto) * Use the bundled versions of our dependencies if they're not installed. * Eliminate use of foreach qw() which will be deprecated in 5.14. [rt.cpan.org 57124] (Zefram) Test Fixes * Guard against old versions of YAML::Tiny that worked differently. [rt.cpan.org 55500]
Diffstat (limited to 'cpan/ExtUtils-MakeMaker/t/parse_abstract.t')
-rw-r--r--cpan/ExtUtils-MakeMaker/t/parse_abstract.t77
1 files changed, 77 insertions, 0 deletions
diff --git a/cpan/ExtUtils-MakeMaker/t/parse_abstract.t b/cpan/ExtUtils-MakeMaker/t/parse_abstract.t
new file mode 100644
index 0000000000..03e56c932e
--- /dev/null
+++ b/cpan/ExtUtils-MakeMaker/t/parse_abstract.t
@@ -0,0 +1,77 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use ExtUtils::MakeMaker;
+
+use Test::More 'no_plan';
+
+sub test_abstract {
+ my($code, $package, $want, $name) = @_;
+
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
+
+ my $file = "t/abstract.tmp";
+ {
+ open my $fh, ">", $file or die "Can't open $file";
+ print $fh $code;
+ close $fh;
+ }
+
+ # Hack up a minimal MakeMaker object.
+ my $mm = bless { DISTNAME => $package }, "MM";
+ my $have = $mm->parse_abstract($file);
+
+ my $ok = is( $have, $want, $name );
+
+ # Clean up the temp file, VMS style
+ 1 while unlink $file;
+
+ return $ok;
+}
+
+
+test_abstract(<<END, "Foo", "Stuff and things", "Simple abstract");
+=head1 NAME
+
+Foo - Stuff and things
+END
+
+
+test_abstract(<<END, "NEXT", "Provide a pseudo-class NEXT (et al) that allows method redispatch", "Name.pm");
+=head1 NAME
+
+NEXT.pm - Provide a pseudo-class NEXT (et al) that allows method redispatch
+END
+
+
+test_abstract(<<END, "Compress::Raw::Zlib::FAQ", "Frequently Asked Questions about Compress::Raw::Zlib", "double dash");
+=pod
+
+Compress::Raw::Zlib::FAQ -- Frequently Asked Questions about Compress::Raw::Zlib
+END
+
+
+test_abstract(<<END, "Foo", "This is", "Only in POD");
+# =pod
+
+Foo - This is not in pod
+
+=cut
+
+Foo - This isn't in pod either
+
+=pod
+
+Foo - This is
+
+Foo - So is this.
+END
+
+
+test_abstract(<<END, "Foo", "the abstract", "more spaces");
+=pod
+
+Foo - the abstract
+END