Update of /cvsroot/module-build/Module-Build/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9199/t
Modified Files:
pod_parser.t
Log Message:
Don't die when an author can't be determined
Index: pod_parser.t
===================================================================
RCS file: /cvsroot/module-build/Module-Build/t/pod_parser.t,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pod_parser.t 28 Jun 2005 03:55:19 -0000 1.3
+++ pod_parser.t 8 Jul 2005 01:29:38 -0000 1.4
@@ -3,7 +3,7 @@
use lib 't/lib';
use strict;
-use Test::More tests => 4;
+use Test::More tests => 7;
use File::Spec ();
@@ -54,3 +54,24 @@
is $pp->get_author->[0], 'C<Foo::Bar> was written by Engelbert Humperdinck I<E<lt>eh...@ex...<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';
+}
+
+
|