This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen win32/config*, up version numbers &c.
[perl5.git] / t / pod / poderrs.t
1 #!./perl
2 BEGIN {
3    chdir 't' if -d 't';
4    unshift @INC, './pod', '../lib';
5    require "testpchk.pl";
6    import TestPodChecker;
7 }
8
9 my %options = map { $_ => 1 } @ARGV;  ## convert cmdline to options-hash
10 my $passed  = testpodchecker \%options, $0;
11 exit( ($passed == 1) ? 0 : -1 )  unless $ENV{HARNESS_ACTIVE};
12
13 ### Deliberately throw in some blank but non-empty lines
14                                         
15 ### The above line should contain spaces
16
17
18 __END__
19
20
21 =head1 NAME
22
23 poderrors.t - test Pod::Checker on some pod syntax errors
24
25 =unknown1 this is an unknown command with two N<unknownA>
26 and D<unknownB> interior sequences.
27
28 This is some paragraph text with some unknown interior sequences,
29 such as Q<unknown2>,
30 A<unknown3>,
31 and Y<unknown4 V<unknown5>>.
32
33 Now try some unterminated sequences like
34 I<hello mudda!
35 B<hello fadda!
36
37 Here I am at C<camp granada!
38
39 Camps is very,
40 entertaining.
41 And they say we'll have some fun if it stops raining!
42
43 Okay, now use a non-empty blank line to terminate a paragraph and make
44 sure we get a warning.
45                                                 
46 The above blank line contains tabs and spaces only
47
48 =head1 Additional tests
49
50 =head2 item without over
51
52 =item oops
53
54 =head2 back without over
55
56 =back
57
58 =head2 over without back
59
60 =over 4
61
62 =item oops
63
64 =head2 end without begin
65
66 =end
67
68 =head2 begin and begin
69
70 =begin html
71
72 =begin text
73
74 =end
75
76 =end
77
78 =head2 Nested sequences of the same type
79
80 C<code I<italic C<code again!>>>
81
82 =head2 Garbled entities
83
84 E<alea iacta est>
85 E<C<auml>>
86 E<abcI<bla>>
87
88 =head2 Unresolved internal links
89
90 L</"begin or begin">
91 L<"end with begin">
92 L</OoPs>
93
94 =head2 Some links with problems
95
96 L<abc
97 def>
98 L<>
99 L<"Warnings"> this one is ok
100
101 =head2 Warnings
102
103 L<passwd(5)>
104 L<   some text|page/"section"   >
105
106 =over 4
107
108 =item bla
109
110 =back 200
111
112 =begin html
113
114 What?
115
116 =end xml
117
118 =over 4
119
120 =back
121
122 see these unescaped < and > in the text?
123
124 =cut
125