2 basic.pod - Test of various basic POD features in translators.
5 Try a few different levels of headings, with embedded formatting codes
6 and other interesting bits.
8 This "is" a "level 1" heading
10 Level 3 heading *with "weird stuff "" (double quote)"*
12 Now try again with intermixed text.
14 This "is" a "level 1" heading
20 Level 3 heading *with "weird stuff"*
27 These are all taken from the Pod::Parser tests.
29 Try out *LOTS* of different ways of specifying references:
31 Reference the "section" in manpage
33 Reference the "section" in "manpage"
35 Reference the "section" in manpage
37 Now try it using the new "|" stuff ...
39 Reference the thistext|
41 Reference the thistext |
43 Reference the thistext|
45 Reference the thistext |
47 Reference the thistext|
49 Reference the thistext|
51 And then throw in a few new ones of my own.
73 "boo", "bar", and "baz"
79 "*Italic* text" in foo
81 "Section "with" *other markup*" in foo|bar
83 Nested <http://www.perl.org/>
86 Taken from Pod::Parser tests, this is a test to ensure that multiline
87 =item paragraphs get indented appropriately.
91 There should be whitespace now before this line.
93 Taken from Pod::Parser tests, this is a test to ensure the nested =item
94 paragraphs get indented appropriately.
109 d This is item c & d.
111 Now some additional weirdness of our own. Make sure that multiple tags
112 for one paragraph are properly compacted.
117 There shouldn't be any spaces between any of these item tags; this
118 idiom is used in perlfunc.
120 Some longer item text
121 Just to make sure that we test paragraphs where the item text
122 doesn't fit in the margin of the paragraph (and make sure that this
123 paragraph fills a few lines).
125 Let's also make it multiple paragraphs to be sure that works.
127 Test use of =over without =item as a block "quote" or block paragraph.
129 This should be indented four spaces but otherwise formatted the same
130 as any other regular text paragraph. Make sure it's long enough to
131 see the results of the formatting.....
133 Now try the same thing nested, and make sure that the indentation is
136 This paragraph should be doubly indented.
138 This paragraph should only be singly indented.
140 * This is an item in the middle of a block-quote, which should be
143 * We're also testing tagless item commands.
145 Should be back to the single level of indentation.
147 Should be back to regular indentation.
149 Now also check the transformation of * into real bullets for man pages.
151 * An item. We're also testing using =over without a number, and making
152 sure that item text wraps properly.
156 and now test the numbering of item blocks.
163 Another test taken from Pod::Parser.
165 This is a test to see if I can do not only $self and "method()", but
166 also "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar"
167 without resorting to escape sequences. If I want to refer to the
168 right-shift operator I can do something like "$x >> 3" or even "$y >>
171 Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
172 And I also want to make sure that newlines work like this
173 "$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]"
175 Of course I should still be able to do all this *with* escape sequences
176 too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
178 Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
180 And make sure that 0 works too!
182 Now, if I use << or >> as my delimiters, then I have to use whitespace.
183 So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
184 up doing what you might expect since the first > will still terminate
187 Lets make sure these work for empty ones too, like "" and ">>" (just to
190 The statement: "This is dog kind's *finest* hour!" is a parody of a
191 quotation from Winston Churchill.
193 The following tests are added to those:
195 Make sure that a few other odd *things* still work. This should be a
196 vertical bar: |. Here's a test of a few more special escapes that have
205 > A greater-than sign.
207 " A double quotation mark.
211 Try to get this bit of text over towards the edge so
212 |that all of this text inside S<> won't| be wrapped. Also test the
213 |same thing with non-breaking spaces.|
215 There is a soft hyphen in hyphen at hy-phen.
217 This is a test of an index entry.
220 Throw in a few verbatim paragraphs.
223 print color 'bold blue';
224 print "This text is bold blue.\n";
226 print "This text is normal.\n";
227 print colored ("Yellow on magenta.\n", 'yellow on_magenta');
228 print "This text is normal.\n";
229 print colored ['yellow on_magenta'], "Yellow on magenta.\n";
231 use Term::ANSIColor qw(uncolor);
232 print uncolor '01;31', "\n";
234 But this isn't verbatim (make sure it wraps properly), and the next
237 use Term::ANSIColor qw(:constants);
238 print BOLD, BLUE, "This text is in bold blue.\n", RESET;
240 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";
242 (Ugh, that's obnoxiously long.) Try different spacing:
249 tab. But this should still be verbatim.
254 This is. And this: is an internal tab. It should be:
255 |--| <= lined up with that.
257 (Tricky, but tabs should be expanded before the translator starts in on
258 the text since otherwise text with mixed tabs and spaces will get messed
261 And now we test verbatim paragraphs right before a heading. Older
262 versions of Pod::Man generated two spaces between paragraphs like this
263 and the heading. (In order to properly test this, one may have to
264 visually inspect the nroff output when run on the generated *roff
265 text, unfortunately.)