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 .Sh "``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 .Sh "``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 manpage
46 Reference the \*(L"section\*(R" in manpage
48 Reference the \*(L"section\*(R" in manpage
50 Reference the \*(L"manpage/section\*(R"
52 Reference the \*(L"section\*(R" in \*(L"manpage\*(R"
54 Reference the \*(L"section\*(R" in manpage
56 Reference the \*(L"section\*(R" in manpage
58 Reference the \*(L"section\*(R" in manpage
60 Now try it using the new \*(L"|\*(R" stuff ...
62 Reference the thistext|
64 Reference the thistext |
66 Reference the thistext|
68 Reference the thistext |
70 Reference the thistext|
72 Reference the thistext |
74 Reference the thistext|
76 Reference the thistext|
78 Reference the thistext |
80 And then throw in a few new ones of my own.
86 \&\*(L"bar\*(R" in foo
88 \&\*(L"baz boo\*(R" in foo
96 \&\*(L"baz boo\*(R" in foo bar
98 \&\*(L"baz boo\*(R" in foo bar
100 \&\*(L"boo\*(R" in foo bar baz
102 \&\*(L"boo var baz\*(R"
106 \&\*(L"boo bar baz / baz boo\*(R"
108 \&\*(L"boo\*(R", \*(L"bar\*(R", and \*(L"baz\*(R"
112 Testing \fIitalics\fR
114 "\fIItalic\fR text" in foo
116 "Section \f(CW\*(C`with\*(C'\fR \fI\f(BIother\fI markup\fR" in foo|bar\&
118 Nested <http://www.perl.org/>
120 .IX Header "OVER AND ITEMS"
121 Taken from Pod::Parser tests, this is a test to ensure that multiline
122 =item paragraphs get indented appropriately.
123 .IP "This is a test." 4
124 .IX Item "This is a test."
126 There should be whitespace now before this line.
128 Taken from Pod::Parser tests, this is a test to ensure the nested =item
129 paragraphs get indented appropriately.
164 Now some additional weirdness of our own. Make sure that multiple tags
165 for one paragraph are properly compacted.
166 .ie n .IP """foo""" 4
172 .ie n .IP """baz""" 4
173 .el .IP "\f(CWbaz\fR" 4
176 There shouldn't be any spaces between any of these item tags; this idiom
178 .IP "Some longer item text" 4
179 .IX Item "Some longer item text"
180 Just to make sure that we test paragraphs where the item text doesn't fit
181 in the margin of the paragraph (and make sure that this paragraph fills a
184 Let's also make it multiple paragraphs to be sure that works.
186 Test use of =over without =item as a block \*(L"quote\*(R" or block paragraph.
189 This should be indented four spaces but otherwise formatted the same as
190 any other regular text paragraph. Make sure it's long enough to see the
191 results of the formatting.....
194 Now try the same thing nested, and make sure that the indentation is reset
199 This paragraph should be doubly indented.
204 This paragraph should only be singly indented.
206 This is an item in the middle of a block\-quote, which should be allowed.
208 We're also testing tagless item commands.
212 Should be back to the single level of indentation.
215 Should be back to regular indentation.
217 Now also check the transformation of * into real bullets for man pages.
219 An item. We're also testing using =over without a number, and making sure
220 that item text wraps properly.
224 and now test the numbering of item blocks.
229 .SH "FORMATTING CODES"
230 .IX Header "FORMATTING CODES"
231 Another test taken from Pod::Parser.
233 This is a test to see if I can do not only \f(CW$self\fR and \f(CW\*(C`method()\*(C'\fR, but
234 also \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
235 \&\f(CW\*(C`$Foo <=> $Bar\*(C'\fR without resorting to escape sequences. If
236 I want to refer to the right-shift operator I can do something
237 like \f(CW\*(C`$x >> 3\*(C'\fR or even \f(CW\*(C`$y >> 5\*(C'\fR.
239 Now for the grand finale of \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
240 And I also want to make sure that newlines work like this
241 \&\f(CW\*(C`$self\->{FOOBAR} >> 3 and [$b => $a]\->[$a <=> $b]\*(C'\fR
243 Of course I should still be able to do all this \fIwith\fR escape sequences
244 too: \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
245 \&\f(CW\*(C`{FOO=>BAR}\*(C'\fR.
247 Dont forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
249 And make sure that \f(CW0\fR works too!
251 Now, if I use << or >> as my delimiters, then I have to use whitespace.
252 So things like \f(CW\*(C`<$self\-\*(C'\fR\fImethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> wont end
253 up doing what you might expect since the first > will still terminate
256 Lets make sure these work for empty ones too, like and \f(CW\*(C`>>\*(C'\fR
257 (just to be obnoxious)
259 The statement: \f(CW\*(C`This is dog kind's \f(CIfinest\f(CW hour!\*(C'\fR is a parody of a
260 quotation from Winston Churchill.
262 The following tests are added to those:
264 Make sure that a few oth\&er odd \fI\&things\fR still work. This should be
265 a vertical bar: |. Here's a test of a few more special escapes
266 that have to be supported:
276 A double quotation mark.
280 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
281 |same\ thing\ with\ non-breaking\ spaces.|
283 There is a soft hyphen in hyphen at hy\-phen.
285 This is a test of an index entry.
286 .IX Xref "index entry"
288 .IX Header "VERBATIM"
289 Throw in a few verbatim paragraphs.
292 \& use Term::ANSIColor;
293 \& print color 'bold blue';
294 \& print "This text is bold blue.\en";
295 \& print color 'reset';
296 \& print "This text is normal.\en";
297 \& print colored ("Yellow on magenta.\en", 'yellow on_magenta');
298 \& print "This text is normal.\en";
299 \& print colored ['yellow on_magenta'], "Yellow on magenta.\en";
303 \& use Term::ANSIColor qw(uncolor);
304 \& print uncolor '01;31', "\en";
307 But this isn't verbatim (make sure it wraps properly), and the next
311 \& use Term::ANSIColor qw(:constants);
312 \& print BOLD, BLUE, "This text is in bold blue.\en", RESET;
316 \& 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";
319 (Ugh, that's obnoxiously long.) Try different spacing:
322 \& Starting with a tab.
327 \&tab. But this should still be verbatim.
334 \& This is. And this: is an internal tab. It should be:
335 \& |--| <= lined up with that.
338 (Tricky, but tabs should be expanded before the translator starts in on
339 the text since otherwise text with mixed tabs and spaces will get messed
343 \& And now we test verbatim paragraphs right before a heading. Older
344 \& versions of Pod::Man generated two spaces between paragraphs like this
345 \& and the heading. (In order to properly test this, one may have to
346 \& visually inspect the nroff output when run on the generated *roff
347 \& text, unfortunately.)
350 .IX Header "CONCLUSION"