3 basic.pod - Test of various basic POD features in translators.
7 Try a few different levels of headings, with embedded formatting codes and
8 other interesting bits.
10 =head1 This C<is> a "level 1" heading
12 =head2 ``Level'' "2 I<heading>
14 =head3 Level 3 B<heading I<with C<weird F<stuff "" (double quote)>>>>
16 =head4 Level "4 C<heading>
18 Now try again with B<intermixed> F<text>.
20 =head1 This C<is> a "level 1" heading
24 =head2 ``Level'' 2 I<heading>
28 =head3 Level 3 B<heading I<with C<weird F<stuff>>>>
32 =head4 Level "4 C<heading>
38 These are all taken from the Pod::Parser tests.
40 Try out I<LOTS> of different ways of specifying references:
42 Reference the L<manpage/section>
44 Reference the L<"manpage"/section>
46 Reference the L<manpage/"section">
48 Now try it using the new "|" stuff ...
50 Reference the L<thistext|manpage/section>|
52 Reference the L<thistext | manpage / section>|
54 Reference the L<thistext| manpage/ section>|
56 Reference the L<thistext |manpage /section>|
58 Reference the L<thistext|manpage/"section">|
60 Reference the L<thistext|
64 And then throw in a few new ones of my own.
86 L</boo>, L</bar>, and L</baz>
90 L<Testing I<italics>|foo/bar>
94 L<fooE<verbar>barZ<>/Section C<with> I<B<other> markup>>
96 L<Nested L<http://www.perl.org/>|fooE<sol>bar>
100 Taken from Pod::Parser tests, this is a test to ensure that multiline
101 =item paragraphs get indented appropriately.
112 There should be whitespace now before this line.
114 Taken from Pod::Parser tests, this is a test to ensure the nested =item
115 paragraphs get indented appropriately.
159 Now some additional weirdness of our own. Make sure that multiple tags
160 for one paragraph are properly compacted.
170 There shouldn't be any spaces between any of these item tags; this idiom
173 =item Some longer item text
175 Just to make sure that we test paragraphs where the item text doesn't fit
176 in the margin of the paragraph (and make sure that this paragraph fills a
179 Let's also make it multiple paragraphs to be sure that works.
183 Test use of =over without =item as a block "quote" or block paragraph.
187 This should be indented four spaces but otherwise formatted the same as
188 any other regular text paragraph. Make sure it's long enough to see the
189 results of the formatting.....
193 Now try the same thing nested, and make sure that the indentation is reset
200 This paragraph should be doubly indented.
204 This paragraph should only be singly indented.
210 This is an item in the middle of a block-quote, which should be allowed.
214 We're also testing tagless item commands.
218 Should be back to the single level of indentation.
222 Should be back to regular indentation.
224 Now also check the transformation of * into real bullets for man pages.
230 An item. We're also testing using =over without a number, and making sure
231 that item text wraps properly.
239 and now test the numbering of item blocks.
253 =head1 FORMATTING CODES
255 Another test taken from Pod::Parser.
257 This is a test to see if I can do not only C<$self> and C<method()>, but
258 also C<< $self->method() >> and C<< $self->{FIELDNAME} >> and
259 C<< $Foo <=> $Bar >> without resorting to escape sequences. If
260 I want to refer to the right-shift operator I can do something
261 like C<<< $x >> 3 >>> or even C<<<< $y >> 5 >>>>.
263 Now for the grand finale of C<< $self->method()->{FIELDNAME} = {FOO=>BAR} >>.
264 And I also want to make sure that newlines work like this
266 $self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]
269 Of course I should still be able to do all this I<with> escape sequences
270 too: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> and
273 Dont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
275 And make sure that C<0> works too!
277 Now, if I use << or >> as my delimiters, then I have to use whitespace.
278 So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
279 up doing what you might expect since the first > will still terminate
282 Lets make sure these work for empty ones too, like C<< >> and C<< >> >>
283 (just to be obnoxious)
285 The statement: C<This is dog kind's I<finest> hour!> is a parody of a
286 quotation from Winston Churchill.
288 The following tests are added to those:
290 Make sure that a few othZ<>er odd I<Z<>things> still work. This should be
291 a vertical bar: E<verbar>. Here's a test of a few more special escapes
292 that have to be supported:
314 A double quotation mark.
322 Try to get this bit of text over towards the edge so S<|that all of this
323 text inside SE<lt>E<gt> won't|> be wrapped. Also test the
324 |sameE<nbsp>thingE<nbsp>withE<nbsp>non-breakingS< spaces>.|
326 There is a soft hyE<shy>phen in hyphen at hy-phen.
328 This is a test of an X<index entry>index entry.
332 Throw in a few verbatim paragraphs.
335 print color 'bold blue';
336 print "This text is bold blue.\n";
338 print "This text is normal.\n";
339 print colored ("Yellow on magenta.\n", 'yellow on_magenta');
340 print "This text is normal.\n";
341 print colored ['yellow on_magenta'], "Yellow on magenta.\n";
343 use Term::ANSIColor qw(uncolor);
344 print uncolor '01;31', "\n";
346 But this isn't verbatim (make sure it wraps properly), and the next
349 use Term::ANSIColor qw(:constants);
350 print BOLD, BLUE, "This text is in bold blue.\n", RESET;
352 use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
354 (Ugh, that's obnoxiously long.) Try different spacing:
361 tab. But this should still be verbatim.
366 This is. And this: is an internal tab. It should be:
367 |--| <= lined up with that.
369 (Tricky, but tabs should be expanded before the translator starts in on
370 the text since otherwise text with mixed tabs and spaces will get messed
373 And now we test verbatim paragraphs right before a heading. Older
374 versions of Pod::Man generated two spaces between paragraphs like this
375 and the heading. (In order to properly test this, one may have to
376 visually inspect the nroff output when run on the generated *roff
377 text, unfortunately.)