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