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.
7 .ie n .SH "This ""is"" a ""level 1"" heading"
8 .el .SH "This \f(CWis\fP a ``level 1'' heading"
9 .IX Header "This is a level 1 heading"
10 .SS "``Level'' ""2 \fIheading\fP"
11 .IX Subsection "``Level'' ""2 heading"
12 \fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff "" (double quote)\f(CB\*(C'\f(BI\f(BI\fI\fR
13 .IX Subsection "Level 3 heading with weird stuff """" (double quote)"
15 Level "4 \f(CW\*(C`heading\*(C'\fR
16 .IX Subsection "Level ""4 heading"
18 Now try again with \fBintermixed\fR \fItext\fR.
19 .ie n .SH "This ""is"" a ""level 1"" heading"
20 .el .SH "This \f(CWis\fP a ``level 1'' heading"
21 .IX Header "This is a level 1 heading"
23 .SS "``Level'' 2 \fIheading\fP"
24 .IX Subsection "``Level'' 2 heading"
27 \fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff\f(CB\*(C'\f(BI\f(BI\fI\fR
28 .IX Subsection "Level 3 heading with weird stuff"
32 Level "4 \f(CW\*(C`heading\*(C'\fR
33 .IX Subsection "Level ""4 heading"
38 These are all taken from the Pod::Parser tests.
40 Try out \fI\s-1LOTS\s0\fR of different ways of specifying references:
42 Reference the \*(L"section\*(R" in manpage
44 Reference the \*(L"section\*(R" in \*(L"manpage\*(R"
46 Reference the \*(L"section\*(R" in manpage
48 Now try it using the new \*(L"|\*(R" stuff ...
50 Reference the thistext|
52 Reference the thistext |
54 Reference the thistext|
56 Reference the thistext |
58 Reference the thistext|
60 Reference the thistext|
62 And then throw in a few new ones of my own.
68 \&\*(L"bar\*(R" in foo
70 \&\*(L"baz boo\*(R" in foo
78 \&\*(L"baz boo\*(R" in foo bar
80 \&\*(L"boo var baz\*(R"
84 \&\*(L"boo\*(R", \*(L"bar\*(R", and \*(L"baz\*(R"
90 "\fIItalic\fR text" in foo
92 "Section \f(CW\*(C`with\*(C'\fR \fI\f(BIother\fI markup\fR" in foo|bar
94 Nested <http://www.perl.org/>
96 .IX Header "OVER AND ITEMS"
97 Taken from Pod::Parser tests, this is a test to ensure that multiline
98 =item paragraphs get indented appropriately.
99 .IP "This is a test." 4
100 .IX Item "This is a test."
102 There should be whitespace now before this line.
104 Taken from Pod::Parser tests, this is a test to ensure the nested =item
105 paragraphs get indented appropriately.
138 Now some additional weirdness of our own. Make sure that multiple tags
139 for one paragraph are properly compacted.
140 .ie n .IP """foo""" 4
146 .ie n .IP """baz""" 4
147 .el .IP "\f(CWbaz\fR" 4
150 There shouldn't be any spaces between any of these item tags; this idiom
152 .IP "Some longer item text" 4
153 .IX Item "Some longer item text"
154 Just to make sure that we test paragraphs where the item text doesn't fit
155 in the margin of the paragraph (and make sure that this paragraph fills a
158 Let's also make it multiple paragraphs to be sure that works.
160 Test use of =over without =item as a block \*(L"quote\*(R" or block paragraph.
163 This should be indented four spaces but otherwise formatted the same as
164 any other regular text paragraph. Make sure it's long enough to see the
165 results of the formatting.....
168 Now try the same thing nested, and make sure that the indentation is reset
173 This paragraph should be doubly indented.
178 This paragraph should only be singly indented.
180 This is an item in the middle of a block-quote, which should be allowed.
182 We're also testing tagless item commands.
186 Should be back to the single level of indentation.
189 Should be back to regular indentation.
191 Now also check the transformation of * into real bullets for man pages.
193 An item. We're also testing using =over without a number, and making sure
194 that item text wraps properly.
198 and now test the numbering of item blocks.
203 .SH "FORMATTING CODES"
204 .IX Header "FORMATTING CODES"
205 Another test taken from Pod::Parser.
207 This is a test to see if I can do not only \f(CW$self\fR and \f(CW\*(C`method()\*(C'\fR, but
208 also \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
209 \&\f(CW\*(C`$Foo <=> $Bar\*(C'\fR without resorting to escape sequences. If
210 I want to refer to the right-shift operator I can do something
211 like \f(CW\*(C`$x >> 3\*(C'\fR or even \f(CW\*(C`$y >> 5\*(C'\fR.
213 Now for the grand finale of \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
214 And I also want to make sure that newlines work like this
215 \&\f(CW\*(C`$self\->{FOOBAR} >> 3 and [$b => $a]\->[$a <=> $b]\*(C'\fR
217 Of course I should still be able to do all this \fIwith\fR escape sequences
218 too: \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
219 \&\f(CW\*(C`{FOO=>BAR}\*(C'\fR.
221 Dont forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
223 And make sure that \f(CW0\fR works too!
225 Now, if I use << or >> as my delimiters, then I have to use whitespace.
226 So things like \f(CW\*(C`<$self\-\*(C'\fR\fImethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> wont end
227 up doing what you might expect since the first > will still terminate
230 Lets make sure these work for empty ones too, like \f(CW\*(C`\*(C'\fR and \f(CW\*(C`>>\*(C'\fR
231 (just to be obnoxious)
233 The statement: \f(CW\*(C`This is dog kind\*(Aqs \f(CIfinest\f(CW hour!\*(C'\fR is a parody of a
234 quotation from Winston Churchill.
236 The following tests are added to those:
238 Make sure that a few other odd \fIthings\fR still work. This should be
239 a vertical bar: |. Here's a test of a few more special escapes
240 that have to be supported:
250 A double quotation mark.
254 Try to get this bit of text over towards the edge so |that\ all\ of\ this\ text\ inside\ S<>\ won't| be wrapped. Also test the
255 |same\ thing\ with\ non-breaking\ spaces.|
257 There is a soft hy\%phen in hyphen at hy-phen.
259 This is a test of an index entry.
260 .IX Xref "index entry"
262 .IX Header "VERBATIM"
263 Throw in a few verbatim paragraphs.
266 \& use Term::ANSIColor;
267 \& print color \*(Aqbold blue\*(Aq;
268 \& print "This text is bold blue.\en";
269 \& print color \*(Aqreset\*(Aq;
270 \& print "This text is normal.\en";
271 \& print colored ("Yellow on magenta.\en", \*(Aqyellow on_magenta\*(Aq);
272 \& print "This text is normal.\en";
273 \& print colored [\*(Aqyellow on_magenta\*(Aq], "Yellow on magenta.\en";
275 \& use Term::ANSIColor qw(uncolor);
276 \& print uncolor \*(Aq01;31\*(Aq, "\en";
279 But this isn't verbatim (make sure it wraps properly), and the next
283 \& use Term::ANSIColor qw(:constants);
284 \& print BOLD, BLUE, "This text is in bold blue.\en", RESET;
286 \& use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\en"; print "This text is normal.\en";
289 (Ugh, that's obnoxiously long.) Try different spacing:
292 \& Starting with a tab.
297 \&tab. But this should still be verbatim.
304 \& This is. And this: is an internal tab. It should be:
305 \& |\-\-| <= lined up with that.
308 (Tricky, but tabs should be expanded before the translator starts in on
309 the text since otherwise text with mixed tabs and spaces will get messed
313 \& And now we test verbatim paragraphs right before a heading. Older
314 \& versions of Pod::Man generated two spaces between paragraphs like this
315 \& and the heading. (In order to properly test this, one may have to
316 \& visually inspect the nroff output when run on the generated *roff
317 \& text, unfortunately.)
320 .IX Header "CONCLUSION"