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