summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/t/pod
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/t/pod')
-rwxr-xr-xcontrib/perl5/t/pod/emptycmd.t4
-rwxr-xr-xcontrib/perl5/t/pod/for.t4
-rwxr-xr-xcontrib/perl5/t/pod/headings.t4
-rwxr-xr-xcontrib/perl5/t/pod/include.t4
-rwxr-xr-xcontrib/perl5/t/pod/included.t4
-rwxr-xr-xcontrib/perl5/t/pod/lref.t4
-rwxr-xr-xcontrib/perl5/t/pod/multiline_items.t4
-rwxr-xr-xcontrib/perl5/t/pod/nested_items.t4
-rwxr-xr-xcontrib/perl5/t/pod/nested_seqs.t4
-rwxr-xr-xcontrib/perl5/t/pod/oneline_cmds.t4
-rwxr-xr-xcontrib/perl5/t/pod/pod2usage.t4
-rwxr-xr-xcontrib/perl5/t/pod/poderrs.t83
-rw-r--r--contrib/perl5/t/pod/poderrs.xr79
-rwxr-xr-xcontrib/perl5/t/pod/podselect.t4
-rwxr-xr-xcontrib/perl5/t/pod/special_seqs.t7
-rw-r--r--contrib/perl5/t/pod/special_seqs.xr3
-rw-r--r--contrib/perl5/t/pod/testp2pt.pl10
17 files changed, 163 insertions, 67 deletions
diff --git a/contrib/perl5/t/pod/emptycmd.t b/contrib/perl5/t/pod/emptycmd.t
index d348a9d..815eba2 100755
--- a/contrib/perl5/t/pod/emptycmd.t
+++ b/contrib/perl5/t/pod/emptycmd.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/for.t b/contrib/perl5/t/pod/for.t
index b8a6ec5..4af528a 100755
--- a/contrib/perl5/t/pod/for.t
+++ b/contrib/perl5/t/pod/for.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/headings.t b/contrib/perl5/t/pod/headings.t
index fc7b4b2..365aa7d 100755
--- a/contrib/perl5/t/pod/headings.t
+++ b/contrib/perl5/t/pod/headings.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/include.t b/contrib/perl5/t/pod/include.t
index 6d0b7e3..b6f1e31 100755
--- a/contrib/perl5/t/pod/include.t
+++ b/contrib/perl5/t/pod/include.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/included.t b/contrib/perl5/t/pod/included.t
index 0e31a09..a25b37b 100755
--- a/contrib/perl5/t/pod/included.t
+++ b/contrib/perl5/t/pod/included.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/lref.t b/contrib/perl5/t/pod/lref.t
index e367d6d..1dd8c68 100755
--- a/contrib/perl5/t/pod/lref.t
+++ b/contrib/perl5/t/pod/lref.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/multiline_items.t b/contrib/perl5/t/pod/multiline_items.t
index 37e8d53..334832d 100755
--- a/contrib/perl5/t/pod/multiline_items.t
+++ b/contrib/perl5/t/pod/multiline_items.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/nested_items.t b/contrib/perl5/t/pod/nested_items.t
index 9c09801..0b86702 100755
--- a/contrib/perl5/t/pod/nested_items.t
+++ b/contrib/perl5/t/pod/nested_items.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/nested_seqs.t b/contrib/perl5/t/pod/nested_seqs.t
index 6a5405b..9f30533 100755
--- a/contrib/perl5/t/pod/nested_seqs.t
+++ b/contrib/perl5/t/pod/nested_seqs.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/oneline_cmds.t b/contrib/perl5/t/pod/oneline_cmds.t
index 3081ef4..bba0e4a 100755
--- a/contrib/perl5/t/pod/oneline_cmds.t
+++ b/contrib/perl5/t/pod/oneline_cmds.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/pod2usage.t b/contrib/perl5/t/pod/pod2usage.t
index bceeeef..70cbacd 100755
--- a/contrib/perl5/t/pod/pod2usage.t
+++ b/contrib/perl5/t/pod/pod2usage.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/poderrs.t b/contrib/perl5/t/pod/poderrs.t
index ec632c2..1b92ede 100755
--- a/contrib/perl5/t/pod/poderrs.t
+++ b/contrib/perl5/t/pod/poderrs.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testpchk.pl";
import TestPodChecker;
}
@@ -59,7 +59,7 @@ The above blank line contains tabs and spaces only
=over 4
-=item oops
+=item aaps
=head2 end without begin
@@ -75,6 +75,20 @@ The above blank line contains tabs and spaces only
=end
+second one results in end w/o begin
+
+=head2 begin w/o formatter
+
+=begin
+
+=end
+
+=head2 for w/o formatter
+
+=for
+
+something...
+
=head2 Nested sequences of the same type
C<code I<italic C<code again!>>>
@@ -84,6 +98,9 @@ C<code I<italic C<code again!>>>
E<alea iacta est>
E<C<auml>>
E<abcI<bla>>
+E<0x100>
+E<07777>
+E<300>
=head2 Unresolved internal links
@@ -96,12 +113,15 @@ L</OoPs>
L<abc
def>
L<>
+L< aha>
+L<oho >
L<"Warnings"> this one is ok
+L</unescaped> ok too, this POD has an X of the same name
=head2 Warnings
L<passwd(5)>
-L< some text|page/"section" >
+L<some text with / in it|perlvar/$|> should give warnings as hell
=over 4
@@ -109,17 +129,70 @@ L< some text|page/"section" >
=back 200
+the 200 is evil
+
=begin html
What?
=end xml
+X<unescaped>see these unescaped < and > in the text?
+
+=head2 Misc
+
+Z<ddd> should be empty
+
+X<> should not be empty
+
+=over four
+
+This paragrapgh is misplaced - it ought to be an item.
+
+=item four should be numeric!
+
+=item
+
+=item blah
+
+=item previous is all empty!!!
+
+=back
+
+All empty over/back:
+
+=over 4
+
+=back
+
+item w/o name
+
+=cut
+
+=pod bla
+
+bla is evil
+
+=cut blub
+
+blub is evil
+
+=head2 reoccurence
+
=over 4
+=item Misc
+
+we already have a head Misc
+
=back
-see these unescaped < and > in the text?
+=head2 some heading
+
+=head2 another one
+
+previous section is empty!
=cut
+
diff --git a/contrib/perl5/t/pod/poderrs.xr b/contrib/perl5/t/pod/poderrs.xr
index b8e5e86..a21efdb 100644
--- a/contrib/perl5/t/pod/poderrs.xr
+++ b/contrib/perl5/t/pod/poderrs.xr
@@ -1,33 +1,46 @@
-*** ERROR: Unknown command 'unknown1' at line 25 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'Q' at line 29 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'A' at line 30 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'Y' at line 31 in file pod/poderrs.t
-*** ERROR: Unknown interior-sequence 'V' at line 31 in file pod/poderrs.t
-*** ERROR: unterminated B<...> at line 35 in file pod/poderrs.t
-*** ERROR: unterminated I<...> at line 34 in file pod/poderrs.t
-*** ERROR: unterminated C<...> at line 37 in file pod/poderrs.t
-*** WARNING: line containing nothing but whitespace in paragraph at line 45 in file pod/poderrs.t
-*** ERROR: =item without previous =over at line 52 in file pod/poderrs.t
-*** ERROR: =back without previous =over at line 56 in file pod/poderrs.t
-*** ERROR: =over on line 60 without closing =back (at head2) at line 64 in file pod/poderrs.t
-*** ERROR: =end without =begin at line 66 in file pod/poderrs.t
-*** ERROR: Nested =begin's (first at line 70:html) at line 72 in file pod/poderrs.t
-*** ERROR: =end without =begin at line 76 in file pod/poderrs.t
-*** ERROR: nested commands C<...C<...>...> at line 80 in file pod/poderrs.t
-*** ERROR: garbled entity E<alea iacta est> at line 84 in file pod/poderrs.t
-*** ERROR: garbled entity E<C<auml>> at line 85 in file pod/poderrs.t
-*** ERROR: garbled entity E<abcI<bla>> at line 86 in file pod/poderrs.t
-*** WARNING: collapsing newlines to blanks at line 96 in file pod/poderrs.t
-*** ERROR: malformed link L<> : empty link at line 98 in file pod/poderrs.t
-*** WARNING: ignoring leading whitespace in link at line 104 in file pod/poderrs.t
-*** WARNING: ignoring trailing whitespace in link at line 104 in file pod/poderrs.t
-*** ERROR: Spurious character(s) after =back at line 110 in file pod/poderrs.t
-*** WARNING: No items in =over (at line 118) / =back list at line 120 in file pod/poderrs.t
-*** WARNING: 2 unescaped <> in paragraph at line 122 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'begin or begin' at line 90 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'end with begin' at line 91 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'OoPs' at line 92 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'abc def' at line 96 in file pod/poderrs.t
-*** ERROR: unresolved internal link 'passwd(5)' at line 103 in file pod/poderrs.t
-*** WARNING: multiple occurence of link target 'oops' at line - in file pod/poderrs.t
-pod/poderrs.t has 25 pod syntax errors.
+*** ERROR: Unknown command 'unknown1' at line 25 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'Q' at line 29 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'A' at line 30 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'Y' at line 31 in file t/pod/poderrs.t
+*** ERROR: Unknown interior-sequence 'V' at line 31 in file t/pod/poderrs.t
+*** ERROR: unterminated B<...> at line 35 in file t/pod/poderrs.t
+*** ERROR: unterminated I<...> at line 34 in file t/pod/poderrs.t
+*** ERROR: unterminated C<...> at line 37 in file t/pod/poderrs.t
+*** WARNING: line containing nothing but whitespace in paragraph at line 45 in file t/pod/poderrs.t
+*** ERROR: =item without previous =over at line 52 in file t/pod/poderrs.t
+*** ERROR: =back without previous =over at line 56 in file t/pod/poderrs.t
+*** ERROR: =over on line 60 without closing =back (at head2) at line 64 in file t/pod/poderrs.t
+*** ERROR: =end without =begin at line 66 in file t/pod/poderrs.t
+*** ERROR: Nested =begin's (first at line 70:html) at line 72 in file t/pod/poderrs.t
+*** ERROR: =end without =begin at line 76 in file t/pod/poderrs.t
+*** ERROR: No argument for =begin at line 82 in file t/pod/poderrs.t
+*** ERROR: =for without formatter specification at line 88 in file t/pod/poderrs.t
+*** ERROR: nested commands C<...C<...>...> at line 94 in file t/pod/poderrs.t
+*** ERROR: garbled entity E<alea iacta est> at line 98 in file t/pod/poderrs.t
+*** ERROR: garbled entity E<C<auml>> at line 99 in file t/pod/poderrs.t
+*** ERROR: garbled entity E<abcI<bla>> at line 100 in file t/pod/poderrs.t
+*** ERROR: Entity number out of range E<0x100> at line 101 in file t/pod/poderrs.t
+*** ERROR: Entity number out of range E<07777> at line 102 in file t/pod/poderrs.t
+*** ERROR: Entity number out of range E<300> at line 103 in file t/pod/poderrs.t
+*** ERROR: malformed link L<> : empty link at line 115 in file t/pod/poderrs.t
+*** WARNING: ignoring leading whitespace in link at line 116 in file t/pod/poderrs.t
+*** WARNING: ignoring trailing whitespace in link at line 117 in file t/pod/poderrs.t
+*** WARNING: (section) in 'passwd(5)' deprecated at line 123 in file t/pod/poderrs.t
+*** WARNING: node '$|' contains non-escaped | or / at line 124 in file t/pod/poderrs.t
+*** WARNING: alternative text '$|' contains non-escaped | or / at line 124 in file t/pod/poderrs.t
+*** ERROR: Spurious character(s) after =back at line 130 in file t/pod/poderrs.t
+*** ERROR: Nonempty Z<> at line 144 in file t/pod/poderrs.t
+*** ERROR: Empty X<> at line 146 in file t/pod/poderrs.t
+*** WARNING: preceding non-item paragraph(s) at line 152 in file t/pod/poderrs.t
+*** WARNING: No argument for =item at line 154 in file t/pod/poderrs.t
+*** WARNING: previous =item has no contents at line 156 in file t/pod/poderrs.t
+*** WARNING: No items in =over (at line 164) / =back list at line 166 in file t/pod/poderrs.t
+*** ERROR: Spurious text after =pod at line 172 in file t/pod/poderrs.t
+*** ERROR: Spurious text after =cut at line 176 in file t/pod/poderrs.t
+*** WARNING: empty section in previous paragraph at line 192 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'begin or begin' at line 107 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'end with begin' at line 108 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'OoPs' at line 109 in file t/pod/poderrs.t
+*** ERROR: unresolved internal link 'abc def' at line 113 in file t/pod/poderrs.t
+*** WARNING: multiple occurence of link target 'Misc' at line - in file t/pod/poderrs.t
+t/pod/poderrs.t has 33 pod syntax errors.
diff --git a/contrib/perl5/t/pod/podselect.t b/contrib/perl5/t/pod/podselect.t
index 30eb30c..5d45cdb 100755
--- a/contrib/perl5/t/pod/podselect.t
+++ b/contrib/perl5/t/pod/podselect.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
diff --git a/contrib/perl5/t/pod/special_seqs.t b/contrib/perl5/t/pod/special_seqs.t
index b8af57e..c6b2ce1 100755
--- a/contrib/perl5/t/pod/special_seqs.t
+++ b/contrib/perl5/t/pod/special_seqs.t
@@ -1,7 +1,7 @@
-#!./perl
BEGIN {
chdir 't' if -d 't';
- unshift @INC, './pod', '../lib';
+ unshift @INC, '../lib';
+ unshift @INC, './pod';
require "testp2pt.pl";
import TestPodIncPlainText;
}
@@ -40,4 +40,7 @@ So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
up doing what you might expect since the first > will still terminate
the first < seen.
+Lets make sure these work for empty ones too, like C<< >> and C<< >> >>
+(just to be obnoxious)
+
=cut
diff --git a/contrib/perl5/t/pod/special_seqs.xr b/contrib/perl5/t/pod/special_seqs.xr
index a07f4cf..a8c715a 100644
--- a/contrib/perl5/t/pod/special_seqs.xr
+++ b/contrib/perl5/t/pod/special_seqs.xr
@@ -20,3 +20,6 @@
up doing what you might expect since the first > will still terminate
the first < seen.
+ Lets make sure these work for empty ones too, like and `>>' (just to be
+ obnoxious)
+
diff --git a/contrib/perl5/t/pod/testp2pt.pl b/contrib/perl5/t/pod/testp2pt.pl
index 2ff8aa4..8cfdbb9 100644
--- a/contrib/perl5/t/pod/testp2pt.pl
+++ b/contrib/perl5/t/pod/testp2pt.pl
@@ -42,8 +42,11 @@ BEGIN {
sub catfile(@) { File::Spec->catfile(@_); }
my $INSTDIR = abs_path(dirname $0);
-$INSTDIR = VMS::Filespec::unixpath($INSTDIR) if $^O eq 'VMS';
-$INSTDIR =~ s#/$## if $^O eq 'VMS';
+if ($^O eq 'VMS') { # clean up directory spec
+ $INSTDIR = VMS::Filespec::unixpath($INSTDIR);
+ $INSTDIR =~ s#/$##;
+ $INSTDIR =~ s#/000000/#/#;
+}
$INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 'pod');
$INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 't');
my @PODINCDIRS = ( catfile($INSTDIR, 'lib', 'Pod'),
@@ -51,6 +54,7 @@ my @PODINCDIRS = ( catfile($INSTDIR, 'lib', 'Pod'),
catfile($INSTDIR, 'pod'),
catfile($INSTDIR, 't', 'pod')
);
+print "PODINCDIRS = ",join(', ',@PODINCDIRS),"\n";
## Find the path to the file to =include
sub findinclude {
@@ -106,7 +110,7 @@ sub begin_input {
sub podinc2plaintext( $ $ ) {
my ($infile, $outfile) = @_;
local $_;
- my $text_parser = $MYPKG->new;
+ my $text_parser = $MYPKG->new(quotes => "`'");
$text_parser->parse_from_file($infile, $outfile);
}
OpenPOWER on IntegriCloud