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