2 basic.pod - Test of various basic POD features in translators.
5 Try a few different levels of headings, with embedded formatting codes and
6 other interesting bits.
8 \e[1mThis "is" a "level 1" heading
\e[m
9 \e[1m``Level'' "2
\e[4mheading
\e[m
\e[m
10 Level 3
\e[1mheading
\e[4mwith "weird stuff "" (double quote)"
\e[m
\e[m
12 Now try again with
\e[1mintermixed
\e[m text.
14 \e[1mThis "is" a "level 1" heading
\e[m
17 \e[1m``Level'' 2
\e[4mheading
\e[m
\e[m
20 Level 3
\e[1mheading
\e[4mwith "weird stuff"
\e[m
\e[m
27 These are all taken from the Pod::Parser tests.
29 Try out
\e[4mLOTS
\e[m 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 Reference the "section" in manpage
39 Reference the "manpage/section"
41 Reference the "section" in "manpage"
43 Reference the "section" in manpage
45 Reference the "section" in manpage
47 Reference the "section" in manpage
49 Now try it using the new "|" stuff ...
51 Reference the thistext|
53 Reference the thistext |
55 Reference the thistext|
57 Reference the thistext |
59 Reference the thistext|
61 Reference the thistext |
63 Reference the thistext|
65 Reference the thistext|
67 Reference the thistext |
69 And then throw in a few new ones of my own.
95 "boo bar baz / baz boo"
97 "boo", "bar", and "baz"
101 Testing
\e[4mitalics
\e[m
103 "
\e[4mItalic
\e[m text" in foo
105 "Section "with"
\e[4m
\e[1mother
\e[m markup
\e[m" in foo|bar
107 Nested <http://www.perl.org/>
109 \e[1mOVER AND ITEMS
\e[m
110 Taken from Pod::Parser tests, this is a test to ensure that multiline
111 =item paragraphs get indented appropriately.
115 There should be whitespace now before this line.
117 Taken from Pod::Parser tests, this is a test to ensure the nested =item
118 paragraphs get indented appropriately.
133 d This is item c & d.
135 Now some additional weirdness of our own. Make sure that multiple tags for
136 one paragraph are properly compacted.
141 There shouldn't be any spaces between any of these item tags; this
142 idiom is used in perlfunc.
144 Some longer item text
145 Just to make sure that we test paragraphs where the item text doesn't
146 fit in the margin of the paragraph (and make sure that this paragraph
149 Let's also make it multiple paragraphs to be sure that works.
151 Test use of =over without =item as a block "quote" or block paragraph.
153 This should be indented four spaces but otherwise formatted the same
154 as any other regular text paragraph. Make sure it's long enough to see
155 the results of the formatting.....
157 Now try the same thing nested, and make sure that the indentation is reset
160 This paragraph should be doubly indented.
162 This paragraph should only be singly indented.
164 * This is an item in the middle of a block-quote, which should be
167 * We're also testing tagless item commands.
169 Should be back to the single level of indentation.
171 Should be back to regular indentation.
173 Now also check the transformation of * into real bullets for man pages.
175 * An item. We're also testing using =over without a number, and making
176 sure that item text wraps properly.
180 and now test the numbering of item blocks.
186 \e[1mFORMATTING CODES
\e[m
187 Another test taken from Pod::Parser.
189 This is a test to see if I can do not only $self and "method()", but also
190 "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar" without
191 resorting to escape sequences. If I want to refer to the right-shift
192 operator I can do something like "$x >> 3" or even "$y >> 5".
194 Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
195 And I also want to make sure that newlines work like this "$self->{FOOBAR}
196 >> 3 and [$b => $a]->[$a <=> $b]"
198 Of course I should still be able to do all this
\e[4mwith
\e[m escape sequences too:
199 "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
201 Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
203 And make sure that 0 works too!
205 Now, if I use << or >> as my delimiters, then I have to use whitespace. So
206 things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end up
207 doing what you might expect since the first > will still terminate the
210 Lets make sure these work for empty ones too, like and ">>" (just to be
213 The statement: "This is dog kind's
\e[4mfinest
\e[m hour!" is a parody of a
214 quotation from Winston Churchill.
216 The following tests are added to those:
218 Make sure that a few other odd
\e[4mthings
\e[m still work. This should be a
219 vertical bar: |. Here's a test of a few more special escapes that have to
228 > A greater-than sign.
230 " A double quotation mark.
234 Try to get this bit of text over towards the edge so
235 |that all of this text inside S<> won't| be wrapped. Also test the
236 |same thing with non-breaking spaces.|
238 There is a soft hyphen in hyphen at hy-phen.
240 This is a test of an index entry.
243 Throw in a few verbatim paragraphs.
246 print color 'bold blue';
247 print "This text is bold blue.\n";
249 print "This text is normal.\n";
250 print colored ("Yellow on magenta.\n", 'yellow on_magenta');
251 print "This text is normal.\n";
252 print colored ['yellow on_magenta'], "Yellow on magenta.\n";
254 use Term::ANSIColor qw(uncolor);
255 print uncolor '01;31', "\n";
257 But this isn't verbatim (make sure it wraps properly), and the next
260 use Term::ANSIColor qw(:constants);
261 print BOLD, BLUE, "This text is in bold blue.\n", RESET;
263 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";
265 (Ugh, that's obnoxiously long.) Try different spacing:
272 tab. But this should still be verbatim.
277 This is. And this: is an internal tab. It should be:
278 |--| <= lined up with that.
280 (Tricky, but tabs should be expanded before the translator starts in on
281 the text since otherwise text with mixed tabs and spaces will get messed
284 And now we test verbatim paragraphs right before a heading. Older
285 versions of Pod::Man generated two spaces between paragraphs like this
286 and the heading. (In order to properly test this, one may have to
287 visually inspect the nroff output when run on the generated *roff
288 text, unfortunately.)