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 Reference the L<manpage /section>
50 Reference the L<"manpage/section">
52 Reference the L<"manpage"/section>
54 Reference the L<manpage/"section">
56 Reference the L<manpage/
59 Reference the L<manpage
62 Now try it using the new "|" stuff ...
64 Reference the L<thistext|manpage/section>|
66 Reference the L<thistext | manpage / section>|
68 Reference the L<thistext| manpage/ section>|
70 Reference the L<thistext |manpage /section>|
72 Reference the L<thistext|
75 Reference the L<thistext
78 Reference the L<thistext|manpage/"section">|
80 Reference the L<thistext|
84 Reference the L<thistext
88 And then throw in a few new ones of my own.
118 L<"boo bar baz / baz boo">
120 L</boo>, L</bar>, and L</baz>
124 L<Testing I<italics>|foo/bar>
126 L<foo/I<Italic> text>
128 L<fooE<verbar>barZ<>/Section C<with> I<B<other> markup>>
130 L<Nested L<http://www.perl.org/>|fooE<sol>bar>
132 =head1 OVER AND ITEMS
134 Taken from Pod::Parser tests, this is a test to ensure that multiline
135 =item paragraphs get indented appropriately.
146 There should be whitespace now before this line.
148 Taken from Pod::Parser tests, this is a test to ensure the nested =item
149 paragraphs get indented appropriately.
193 Now some additional weirdness of our own. Make sure that multiple tags
194 for one paragraph are properly compacted.
204 There shouldn't be any spaces between any of these item tags; this idiom
207 =item Some longer item text
209 Just to make sure that we test paragraphs where the item text doesn't fit
210 in the margin of the paragraph (and make sure that this paragraph fills a
213 Let's also make it multiple paragraphs to be sure that works.
217 Test use of =over without =item as a block "quote" or block paragraph.
221 This should be indented four spaces but otherwise formatted the same as
222 any other regular text paragraph. Make sure it's long enough to see the
223 results of the formatting.....
227 Now try the same thing nested, and make sure that the indentation is reset
234 This paragraph should be doubly indented.
238 This paragraph should only be singly indented.
244 This is an item in the middle of a block-quote, which should be allowed.
248 We're also testing tagless item commands.
252 Should be back to the single level of indentation.
256 Should be back to regular indentation.
258 Now also check the transformation of * into real bullets for man pages.
264 An item. We're also testing using =over without a number, and making sure
265 that item text wraps properly.
273 and now test the numbering of item blocks.
287 =head1 FORMATTING CODES
289 Another test taken from Pod::Parser.
291 This is a test to see if I can do not only C<$self> and C<method()>, but
292 also C<< $self->method() >> and C<< $self->{FIELDNAME} >> and
293 C<< $Foo <=> $Bar >> without resorting to escape sequences. If
294 I want to refer to the right-shift operator I can do something
295 like C<<< $x >> 3 >>> or even C<<<< $y >> 5 >>>>.
297 Now for the grand finale of C<< $self->method()->{FIELDNAME} = {FOO=>BAR} >>.
298 And I also want to make sure that newlines work like this
300 $self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]
303 Of course I should still be able to do all this I<with> escape sequences
304 too: C<$self-E<gt>method()> and C<$self-E<gt>{FIELDNAME}> and
307 Dont forget C<$self-E<gt>method()-E<gt>{FIELDNAME} = {FOO=E<gt>BAR}>.
309 And make sure that C<0> works too!
311 Now, if I use << or >> as my delimiters, then I have to use whitespace.
312 So things like C<<$self->method()>> and C<<$self->{FIELDNAME}>> wont end
313 up doing what you might expect since the first > will still terminate
316 Lets make sure these work for empty ones too, like C<< >> and C<< >> >>
317 (just to be obnoxious)
319 The statement: C<This is dog kind's I<finest> hour!> is a parody of a
320 quotation from Winston Churchill.
322 The following tests are added to those:
324 Make sure that a few othZ<>er odd I<Z<>things> still work. This should be
325 a vertical bar: E<verbar>. Here's a test of a few more special escapes
326 that have to be supported:
348 A double quotation mark.
356 Try to get this bit of text over towards the edge so S<|that all of this
357 text inside SE<lt>E<gt> won't|> be wrapped. Also test the
358 |sameE<nbsp>thingE<nbsp>withE<nbsp>non-breakingS< spaces>.|
360 There is a soft hyE<shy>phen in hyphen at hy-phen.
362 This is a test of an X<index entry>index entry.
366 Throw in a few verbatim paragraphs.
369 print color 'bold blue';
370 print "This text is bold blue.\n";
372 print "This text is normal.\n";
373 print colored ("Yellow on magenta.\n", 'yellow on_magenta');
374 print "This text is normal.\n";
375 print colored ['yellow on_magenta'], "Yellow on magenta.\n";
377 use Term::ANSIColor qw(uncolor);
378 print uncolor '01;31', "\n";
380 But this isn't verbatim (make sure it wraps properly), and the next
383 use Term::ANSIColor qw(:constants);
384 print BOLD, BLUE, "This text is in bold blue.\n", RESET;
386 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";
388 (Ugh, that's obnoxiously long.) Try different spacing:
395 tab. But this should still be verbatim.
400 This is. And this: is an internal tab. It should be:
401 |--| <= lined up with that.
403 (Tricky, but tabs should be expanded before the translator starts in on
404 the text since otherwise text with mixed tabs and spaces will get messed