[ID 20011219.004] Pod::Usage does not terminate with a true value
[p5sagit/p5-mst-13.2.git] / lib / Pod / t / basic.man
CommitLineData
b616daaf 1.UC
2.SH "NAME"
3basic.pod \- Test of various basic \s-1POD\s0 features in translators.
4.SH "HEADINGS"
5.IX Header "HEADINGS"
6Try a few different levels of headings, with embedded formatting codes and
7other interesting bits.
8.ie n .SH "This ""is"" a ""level 1"" heading"
9.el .SH "This \f(CWis\fP a ``level 1'' heading"
10.IX Header "This is a level 1 heading"
11.Sh "``Level'' ""2 \fIheading\fP"
12.IX Subsection "``Level'' ""2 heading"
13\fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff "" (double quote)\f(CB\*(C'\f(BI\f(BI\fI\fR
14.IX Subsection "Level 3 heading with weird stuff """" (double quote)"
15.PP
16Level "4 \f(CW\*(C`heading\*(C'\fR
17.IX Subsection "Level ""4 heading"
18.PP
19Now try again with \fBintermixed\fR \fItext\fR.
20.ie n .SH "This ""is"" a ""level 1"" heading"
21.el .SH "This \f(CWis\fP a ``level 1'' heading"
22.IX Header "This is a level 1 heading"
23Text.
24.Sh "``Level'' 2 \fIheading\fP"
25.IX Subsection "``Level'' 2 heading"
26Text.
27.PP
28\fILevel 3 \f(BIheading \f(BIwith \f(CB\*(C`weird \f(CBstuff\f(CB\*(C'\f(BI\f(BI\fI\fR
29.IX Subsection "Level 3 heading with weird stuff"
30.PP
31Text.
32.PP
33Level "4 \f(CW\*(C`heading\*(C'\fR
34.IX Subsection "Level ""4 heading"
35.PP
36Text.
37.SH "LINKS"
38.IX Header "LINKS"
39These are all taken from the Pod::Parser tests.
40.PP
41Try out \fI\s-1LOTS\s0\fR of different ways of specifying references:
42.PP
43Reference the \*(L"section\*(R" in manpage
44.PP
45Reference the \*(L"section\*(R" in manpage
46.PP
47Reference the \*(L"section\*(R" in manpage
48.PP
49Reference the \*(L"section\*(R" in manpage
50.PP
51Reference the \*(L"manpage/section\*(R"
52.PP
53Reference the \*(L"section\*(R" in \*(L"manpage\*(R"
54.PP
55Reference the \*(L"section\*(R" in manpage
56.PP
57Reference the \*(L"section\*(R" in manpage
58.PP
59Reference the \*(L"section\*(R" in manpage
60.PP
61Now try it using the new \*(L"|\*(R" stuff ...
62.PP
63Reference the thistext|
64.PP
65Reference the thistext |
66.PP
67Reference the thistext|
68.PP
69Reference the thistext |
70.PP
71Reference the thistext|
72.PP
73Reference the thistext |
74.PP
75Reference the thistext|
76.PP
77Reference the thistext|
78.PP
79Reference the thistext |
80.PP
81And then throw in a few new ones of my own.
82.PP
83foo
84.PP
85foo
86.PP
87\&\*(L"bar\*(R" in foo
88.PP
89\&\*(L"baz boo\*(R" in foo
90.PP
91\&\*(L"bar\*(R"
92.PP
93\&\*(L"baz boo\*(R"
94.PP
95\&\*(L"baz boo\*(R"
96.PP
97\&\*(L"baz boo\*(R" in foo bar
98.PP
99\&\*(L"baz boo\*(R" in foo bar
100.PP
101\&\*(L"boo\*(R" in foo bar baz
102.PP
103\&\*(L"boo var baz\*(R"
104.PP
105\&\*(L"bar baz\*(R"
106.PP
107\&\*(L"boo bar baz / baz boo\*(R"
108.PP
109\&\*(L"boo\*(R", \*(L"bar\*(R", and \*(L"baz\*(R"
110.PP
111foo\&bar
112.PP
113Testing \fIitalics\fR
114.PP
115"\fIItalic\fR text" in foo
116.PP
117"Section \f(CW\*(C`with\*(C'\fR \fI\f(BIother\fI markup\fR" in foo|bar\&
118.PP
119Nested <http://www.perl.org/>
120.SH "OVER AND ITEMS"
121.IX Header "OVER AND ITEMS"
122Taken from Pod::Parser tests, this is a test to ensure that multiline
123=item paragraphs get indented appropriately.
124.IP "This is a test." 4
125.IX Item "This is a test."
126.PP
127There should be whitespace now before this line.
128.PP
129Taken from Pod::Parser tests, this is a test to ensure the nested =item
130paragraphs get indented appropriately.
131.IP "1" 2
132.IX Item "1"
133First section.
134.RS 2
135.IP "a" 2
136.IX Item "a"
137this is item a
138.IP "b" 2
139.IX Item "b"
140this is item b
141.RE
142.RS 2
143.RE
144.IP "2" 2
145.IX Item "2"
146Second section.
147.RS 2
148.IP "a" 2
149.IX Item "a"
150this is item a
151.IP "b" 2
152.IX Item "b"
153this is item b
154.IP "c" 2
155.IX Item "c"
156.PD 0
157.IP "d" 2
158.IX Item "d"
159.PD
160This is item c & d.
161.RE
162.RS 2
163.RE
164.PP
165Now some additional weirdness of our own. Make sure that multiple tags
166for one paragraph are properly compacted.
167.ie n .IP """foo""" 4
168.el .IP "``foo''" 4
169.IX Item "foo"
170.PD 0
171.IP "\fBbar\fR" 4
172.IX Item "bar"
173.ie n .IP """baz""" 4
174.el .IP "\f(CWbaz\fR" 4
175.IX Item "baz"
176.PD
177There shouldn't be any spaces between any of these item tags; this idiom
178is used in perlfunc.
179.IP "Some longer item text" 4
180.IX Item "Some longer item text"
181Just to make sure that we test paragraphs where the item text doesn't fit
182in the margin of the paragraph (and make sure that this paragraph fills a
183few lines).
184.Sp
185Let's also make it multiple paragraphs to be sure that works.
186.PP
187Test use of =over without =item as a block \*(L"quote\*(R" or block paragraph.
188.Sp
189.RS 4
190This should be indented four spaces but otherwise formatted the same as
191any other regular text paragraph. Make sure it's long enough to see the
192results of the formatting.....
193.RE
194.PP
195Now try the same thing nested, and make sure that the indentation is reset
196back properly.
197.RS 4
198.Sp
199.RS 4
200This paragraph should be doubly indented.
201.RE
202.RE
203.RS 4
204.Sp
205This paragraph should only be singly indented.
206.IP "\(bu" 4
207This is an item in the middle of a block\-quote, which should be allowed.
208.IP "\(bu" 4
209We're also testing tagless item commands.
210.RE
211.RS 4
212.Sp
213Should be back to the single level of indentation.
214.RE
215.PP
216Should be back to regular indentation.
217.PP
218Now also check the transformation of * into real bullets for man pages.
219.IP "\(bu" 4
220An item. We're also testing using =over without a number, and making sure
221that item text wraps properly.
222.IP "\(bu" 4
223Another item.
224.PP
225and now test the numbering of item blocks.
226.IP "1." 4
227First item.
228.IP "2." 4
229Second item.
230.SH "FORMATTING CODES"
231.IX Header "FORMATTING CODES"
232Another test taken from Pod::Parser.
233.PP
234This is a test to see if I can do not only \f(CW$self\fR and \f(CW\*(C`method()\*(C'\fR, but
235also \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
236\&\f(CW\*(C`$Foo <=> $Bar\*(C'\fR without resorting to escape sequences. If
237I want to refer to the right-shift operator I can do something
238like \f(CW\*(C`$x >> 3\*(C'\fR or even \f(CW\*(C`$y >> 5\*(C'\fR.
239.PP
240Now for the grand finale of \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
241And I also want to make sure that newlines work like this
242\&\f(CW\*(C`$self\->{FOOBAR} >> 3 and [$b => $a]\->[$a <=> $b]\*(C'\fR
243.PP
244Of course I should still be able to do all this \fIwith\fR escape sequences
245too: \f(CW\*(C`$self\->method()\*(C'\fR and \f(CW\*(C`$self\->{FIELDNAME}\*(C'\fR and
246\&\f(CW\*(C`{FOO=>BAR}\*(C'\fR.
247.PP
248Dont forget \f(CW\*(C`$self\->method()\->{FIELDNAME} = {FOO=>BAR}\*(C'\fR.
249.PP
250And make sure that \f(CW0\fR works too!
251.PP
252Now, if I use << or >> as my delimiters, then I have to use whitespace.
253So things like \f(CW\*(C`<$self\-\*(C'\fR\fImethod()\fR>> and \f(CW\*(C`<$self\-\*(C'\fR{\s-1FIELDNAME\s0}>> wont end
254up doing what you might expect since the first > will still terminate
255the first < seen.
256.PP
257Lets make sure these work for empty ones too, like and \f(CW\*(C`>>\*(C'\fR
258(just to be obnoxious)
259.PP
260The statement: \f(CW\*(C`This is dog kind's \f(CIfinest\f(CW hour!\*(C'\fR is a parody of a
261quotation from Winston Churchill.
262.PP
263The following tests are added to those:
264.PP
265Make sure that a few oth\&er odd \fI\&things\fR still work. This should be
266a vertical bar: |. Here's a test of a few more special escapes
267that have to be supported:
268.IP "&" 3
269An ampersand.
270.IP "'" 3
271An apostrophe.
272.IP "<" 3
273A less-than sign.
274.IP ">" 3
275A greater-than sign.
276.IP """" 3
277A double quotation mark.
278.IP "/" 3
279A forward slash.
280.PP
281Try 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
282|same\ thing\ with\ non-breaking\ spaces.|
283.PP
284There is a soft hyphen in hyphen at hy\-phen.
285.PP
286This is a test of an index entry.
287.IX Xref "index entry"
288.SH "VERBATIM"
289.IX Header "VERBATIM"
290Throw in a few verbatim paragraphs.
291.PP
292.Vb 8
293\& use Term::ANSIColor;
294\& print color 'bold blue';
295\& print "This text is bold blue.\en";
296\& print color 'reset';
297\& print "This text is normal.\en";
298\& print colored ("Yellow on magenta.\en", 'yellow on_magenta');
299\& print "This text is normal.\en";
300\& print colored ['yellow on_magenta'], "Yellow on magenta.\en";
301.Ve
302.Vb 2
303\& use Term::ANSIColor qw(uncolor);
304\& print uncolor '01;31', "\en";
305.Ve
306But this isn't verbatim (make sure it wraps properly), and the next
307paragraph is again:
308.PP
309.Vb 2
310\& use Term::ANSIColor qw(:constants);
311\& print BOLD, BLUE, "This text is in bold blue.\en", RESET;
312.Ve
313.Vb 1
314\& 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";
315.Ve
316(Ugh, that's obnoxiously long.) Try different spacing:
317.PP
318.Vb 7
319\& Starting with a tab.
320\&Not
321\&starting
322\&with
323\&a
324\&tab. But this should still be verbatim.
325\& As should this.
326.Ve
327This isn't.
328.PP
329.Vb 2
330\& This is. And this: is an internal tab. It should be:
331\& |--| <= lined up with that.
332.Ve
333(Tricky, but tabs should be expanded before the translator starts in on
334the text since otherwise text with mixed tabs and spaces will get messed
335up.)