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