From: Jarkko Hietaniemi Date: Tue, 25 Jun 2002 19:20:15 +0000 (+0000) Subject: Upgrade to podlators 1.22. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f011ec7d875a16a3b68226895fa8fc9035bb6e2e;p=p5sagit%2Fp5-mst-13.2.git Upgrade to podlators 1.22. p4raw-id: //depot/perl@17354 --- diff --git a/MANIFEST b/MANIFEST index 71f37d0..69ce556 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1388,6 +1388,7 @@ lib/Pod/t/man.t podlators test lib/Pod/t/parselink.t podlators test lib/Pod/t/pod2html-lib.pl pod2html testing library lib/Pod/t/Select.t See if Pod::Select works +lib/Pod/t/text.t podlators test lib/Pod/t/text-errors.t podlators test lib/Pod/t/Usage.t See if Pod::Usage works lib/Pod/t/utils.t Test for Pod::ParseUtils diff --git a/lib/Pod/Man.pm b/lib/Pod/Man.pm index 0f0eaab..341c881 100644 --- a/lib/Pod/Man.pm +++ b/lib/Pod/Man.pm @@ -1,5 +1,5 @@ # Pod::Man -- Convert POD data to formatted *roff input. -# $Id: Man.pm,v 1.32 2002/01/02 09:02:24 eagle Exp $ +# $Id: Man.pm,v 1.33 2002/06/23 19:16:21 eagle Exp $ # # Copyright 1999, 2000, 2001, 2002 by Russ Allbery # @@ -38,7 +38,7 @@ use vars qw(@ISA %ESCAPES $PREAMBLE $VERSION); # Don't use the CVS revision as the version, since this module is also in Perl # core and too many things could munge CVS magic revision strings. This # number should ideally be the same as the CVS revision in podlators, however. -$VERSION = 1.32; +$VERSION = 1.33; ############################################################################## @@ -1012,7 +1012,7 @@ sub quote_literal { | \$+ [\#^]? \S $index # special ($^Foo, $") | [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func | [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call - | [+-]? [\d.]+ (?: [eE] [+-]? \d+ )? # a number + | [+-]? ( \d[\d.]* | \.\d+ ) (?: [eE][+-]?\d+ )? # a number | 0x [a-fA-F\d]+ # a hex constant ) \s*\z diff --git a/lib/Pod/Text.pm b/lib/Pod/Text.pm index 12a450b..5806257 100644 --- a/lib/Pod/Text.pm +++ b/lib/Pod/Text.pm @@ -1,7 +1,7 @@ # Pod::Text -- Convert POD data to formatted ASCII text. -# $Id: Text.pm,v 2.18 2002/01/01 02:40:51 eagle Exp $ +# $Id: Text.pm,v 2.19 2002/06/23 19:16:21 eagle Exp $ # -# Copyright 1999, 2000, 2001 by Russ Allbery +# Copyright 1999, 2000, 2001, 2002 by Russ Allbery # # This program is free software; you may redistribute it and/or modify it # under the same terms as Perl itself. @@ -43,7 +43,7 @@ use vars qw(@ISA @EXPORT %ESCAPES $VERSION); # Don't use the CVS revision as the version, since this module is also in Perl # core and too many things could munge CVS magic revision strings. This # number should ideally be the same as the CVS revision in podlators, however. -$VERSION = 2.18; +$VERSION = 2.19; ############################################################################## @@ -459,7 +459,7 @@ sub seq_c { | \$+ [\#^]? \S $index # special ($^Foo, $") | [\$\@%&*]+ \#? [:\'\w]+ $index # plain var or func | [\$\@%&*]* [:\'\w]+ (?: -> )? \(\s*[^\s,]\s*\) # 0/1-arg func call - | [+-]? [\d.]+ (?: [eE] [+-]? \d+ )? # a number + | [+-]? ( \d[\d.]* | \.\d+ ) (?: [eE][+-]?\d+ )? # a number | 0x [a-fA-F\d]+ # a hex constant ) \s*\z @@ -821,7 +821,7 @@ Pod::Parser by Brad Appleton . =head1 COPYRIGHT AND LICENSE -Copyright 1999, 2000, 2001 by Russ Allbery . +Copyright 1999, 2000, 2001, 2002 by Russ Allbery . This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. diff --git a/lib/Pod/t/man.t b/lib/Pod/t/man.t index 5171cc6..8bf7abd 100644 --- a/lib/Pod/t/man.t +++ b/lib/Pod/t/man.t @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# $Id: man.t,v 1.1 2002/01/02 09:03:28 eagle Exp $ +# $Id: man.t,v 1.2 2002/06/23 19:16:25 eagle Exp $ # # man.t -- Additional specialized tests for Pod::Man. # @@ -17,7 +17,7 @@ BEGIN { } unshift (@INC, '../blib/lib'); $| = 1; - print "1..2\n"; + print "1..3\n"; } END { @@ -84,3 +84,13 @@ gcc \- GNU project C and C++ compiler .IX Header " NOTES" Other mentions of \*(C+. ### + +### +=head1 PERIODS + +This C<.> should be quoted. +### +.SH "PERIODS" +.IX Header "PERIODS" +This \f(CW\*(C`.\*(C'\fR should be quoted. +### diff --git a/lib/Pod/t/text.t b/lib/Pod/t/text.t new file mode 100644 index 0000000..dc8579a --- /dev/null +++ b/lib/Pod/t/text.t @@ -0,0 +1,79 @@ +#!/usr/bin/perl -w +# $Id: text.t,v 1.1 2002/06/23 19:16:25 eagle Exp $ +# +# text.t -- Additional specialized tests for Pod::Text. +# +# Copyright 2002 by Russ Allbery +# +# This program is free software; you may redistribute it and/or modify it +# under the same terms as Perl itself. + +BEGIN { + chdir 't' if -d 't'; + if ($ENV{PERL_CORE}) { + @INC = '../lib'; + } else { + unshift (@INC, '../blib/lib'); + } + unshift (@INC, '../blib/lib'); + $| = 1; + print "1..2\n"; +} + +END { + print "not ok 1\n" unless $loaded; +} + +use Pod::Text; + +$loaded = 1; +print "ok 1\n"; + +my $n = 2; +while () { + next until $_ eq "###\n"; + open (TMP, '> tmp.pod') or die "Cannot create tmp.pod: $!\n"; + while () { + last if $_ eq "###\n"; + print TMP $_; + } + close TMP; + my $parser = Pod::Text->new or die "Cannot create parser\n"; + $parser->parse_from_file ('tmp.pod', 'out.tmp'); + open (TMP, 'out.tmp') or die "Cannot open out.tmp: $!\n"; + my $output; + { + local $/; + $output = ; + } + close TMP; + unlink ('tmp.pod', 'out.tmp'); + my $expected = ''; + while () { + last if $_ eq "###\n"; + $expected .= $_; + } + if ($output eq $expected) { + print "ok $n\n"; + } else { + print "not ok $n\n"; + print "Expected\n========\n$expected\nOutput\n======\n$output\n"; + } + $n++; +} + +# Below the marker are bits of POD and corresponding expected text output. +# This is used to test specific features or problems with Pod::Text. The +# input and output are separated by lines containing only ###. + +__DATA__ + +### +=head1 PERIODS + +This C<.> should be quoted. +### +PERIODS + This "." should be quoted. + +###