~ubuntu-branches/ubuntu/vivid/libhtml-wikiconverter-perl/vivid

« back to all changes in this revision

Viewing changes to t/docuwiki.t

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Genannt
  • Date: 2005-12-26 23:42:31 UTC
  • Revision ID: james.westby@ubuntu.com-20051226234231-66czoq4xko7s5p96
Tags: upstream-0.30
ImportĀ upstreamĀ versionĀ 0.30

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
local $/;
 
2
require 't/runtests.pl';
 
3
runtests( data => <DATA>, dialect => 'DocuWiki', wiki_uri => 'http://www.test.com/wiki:', camel_case => 1 );
 
4
close DATA;
 
5
 
 
6
__DATA__
 
7
table
 
8
<table><tr><td>thing</td></tr></table>
 
9
++
 
10
| thing |
 
11
++++
 
12
table (multi-row)
 
13
<table>
 
14
<tr><td>one</td></tr>
 
15
<tr><td>two</td></tr>
 
16
</table>
 
17
++
 
18
| one |
 
19
| two |
 
20
++++
 
21
table (full 1)
 
22
<table>
 
23
<tr><th class="centeralign" colspan="3">Table with alignment</th></tr>
 
24
<tr><td class="rightalign">right</td><td class="centeralign">center</td><td class="leftalign">left</td></tr>
 
25
<tr><td class="leftalign">left</td><td class="rightalign">right</td><td class="centeralign">center</td></tr>
 
26
<tr><td>xxxxxxxxxxxx</td><td>xxxxxxxxxxxx</td><td>xxxxxxxxxxxx</td></tr>
 
27
</table>
 
28
++
 
29
^  Table with alignment  ^^^
 
30
|  right |  center  | left  |
 
31
| left  |  right |  center  |
 
32
| xxxxxxxxxxxx | xxxxxxxxxxxx | xxxxxxxxxxxx |
 
33
++++
 
34
table (full 2)
 
35
<table>
 
36
<tr><th class="leftalign">Heading 1</th><th class="leftalign">Heading 2</th><th class="leftalign">Heading 3</th></tr>
 
37
<tr><td class="leftalign">Row 1 Col 1</td><td class="leftalign">Row 1 Col 2</td><td class="leftalign">Row 1 Col 3</td></tr>
 
38
<tr><td class="leftalign">Row 2 Col 1</td><td colspan="2">some colspan (note the double pipe)</td></tr>
 
39
<tr><td class="leftalign">Row 3 Col 1</td><td class="leftalign">Row 2 Col 2</td><td class="leftalign">Row 2 Col 3</td></tr>
 
40
</table>
 
41
++
 
42
^ Heading 1  ^ Heading 2  ^ Heading 3  ^
 
43
| Row 1 Col 1  | Row 1 Col 2  | Row 1 Col 3  |
 
44
| Row 2 Col 1  | some colspan (note the double pipe) ||
 
45
| Row 3 Col 1  | Row 2 Col 2  | Row 2 Col 3  |
 
46
++++
 
47
table (full 3)
 
48
<table>
 
49
<tr><th>name</th><td>foo</td></tr>
 
50
<tr><th>age</th><td>3.14</td></tr>
 
51
<tr><th>odd</th><td>true</td></tr>
 
52
</table>
 
53
++
 
54
^ name | foo |
 
55
^ age | 3.14 |
 
56
^ odd | true |
 
57
++++
 
58
h1
 
59
<h1>one</h1>
 
60
++
 
61
====== one ======
 
62
++++
 
63
h2
 
64
<h2>two</h2>
 
65
++
 
66
===== two =====
 
67
++++
 
68
h3
 
69
<h3>three</h3>
 
70
++
 
71
==== three ====
 
72
++++
 
73
h4
 
74
<h4>four</h4>
 
75
++
 
76
=== four ===
 
77
++++
 
78
h5
 
79
<h5>five</h5>
 
80
++
 
81
== five ==
 
82
++++
 
83
h6
 
84
<h6>six</h6>
 
85
++
 
86
== six ==
 
87
++++
 
88
external image
 
89
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" />
 
90
++
 
91
{{http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png}}
 
92
++++
 
93
external image (resize width)
 
94
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" width="25" />
 
95
++
 
96
{{http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png?25}}
 
97
++++
 
98
external image (resize width and height)
 
99
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" width="25" height="30" />
 
100
++
 
101
{{http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png?25x30}}
 
102
++++
 
103
external image align (left)
 
104
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" class="medialeft" />
 
105
++
 
106
{{http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png }}
 
107
++++
 
108
external image align (right)
 
109
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" class="mediaright" />
 
110
++
 
111
{{ http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png}}
 
112
++++
 
113
external image align (center)
 
114
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" class="mediacenter" />
 
115
++
 
116
{{ http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png }}
 
117
++++
 
118
external image align (center w/ caption)
 
119
<img src="http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png" class="mediacenter" alt="Caption" />
 
120
++
 
121
{{ http://wiki.splitbrain.org/fetch.php?w=&h=&cache=cache&media=wiki%3Adokuwiki-128.png |Caption}}
 
122
++++
 
123
blockquote
 
124
<blockquote>one</blockquote>
 
125
++
 
126
> one
 
127
++++
 
128
blockquote (nested)
 
129
<blockquote><blockquote>two</blockquote></blockquote>
 
130
++
 
131
>> two
 
132
++++
 
133
blockquote (multi-line)
 
134
<blockquote>span
 
135
single
 
136
line</blockquote>
 
137
++
 
138
> span single line
 
139
++++
 
140
blockquote (nested multi-line)
 
141
<blockquote><blockquote>span
 
142
single
 
143
line</blockquote></blockquote>
 
144
++
 
145
>> span single line
 
146
++++
 
147
blockquote (markup)
 
148
<blockquote><b>with</b> <em>fancy
 
149
markup</em> that <u>spans
 
150
multiple
 
151
lines</u></blockquote>
 
152
++
 
153
> **with** //fancy markup// that __spans multiple lines__
 
154
++++
 
155
blockquote (nested continuous)
 
156
<blockquote>one<blockquote>two</blockquote></blockquote>
 
157
++
 
158
> one
 
159
>> two
 
160
++++
 
161
blockquote (doubly nested continuous)
 
162
<blockquote>one<blockquote>two<blockquote>three</blockquote></blockquote></blockquote>
 
163
++
 
164
> one
 
165
>> two
 
166
>>> three
 
167
++++
 
168
blockquote (linebreak)
 
169
<blockquote>line<br />break</blockquote>
 
170
++
 
171
> line\\ break
 
172
++++
 
173
blockquote (full)
 
174
<blockquote>
 
175
 No we shouldn't</blockquote>
 
176
<blockquote>
 
177
<blockquote>
 
178
 Well, I say we should</blockquote>
 
179
</blockquote>
 
180
<blockquote>
 
181
 Really?</blockquote>
 
182
<blockquote>
 
183
 
 
184
<blockquote>
 
185
 Yes!</blockquote>
 
186
</blockquote>
 
187
<blockquote>
 
188
<blockquote>
 
189
<blockquote>
 
190
 Then lets do it!</blockquote>
 
191
</blockquote>
 
192
</blockquote>
 
193
++
 
194
> No we shouldn't
 
195
 
 
196
>> Well, I say we should 
 
197
 
 
198
> Really?
 
199
 
 
200
>> Yes! 
 
201
 
 
202
>>> Then lets do it!
 
203
++++
 
204
internal link (lcase)
 
205
<a href="/wiki:test">test</a>
 
206
++
 
207
[[test]]
 
208
++++
 
209
internal link (ucase)
 
210
<a href="/wiki:test">TEST</a>
 
211
++
 
212
[[TEST]]
 
213
++++
 
214
internal link (camel case)
 
215
<a href="/wiki:test">tEsT</a>
 
216
++
 
217
tEsT
 
218
++++
 
219
external link (anonymous)
 
220
<a href="http://www.test.com">http://www.test.com</a>
 
221
++
 
222
http://www.test.com
 
223
++++
 
224
external link (named)
 
225
<a href="http://www.test.com">test</a>
 
226
++
 
227
[[http://www.test.com|test]]
 
228
++++
 
229
external link (fragment)
 
230
<a href="/wiki:syntax#internal">this Section</a>
 
231
++
 
232
[[syntax#internal|this Section]]
 
233
++++
 
234
linebreak
 
235
line<br />break
 
236
++
 
237
line\\ break
 
238
++++
 
239
bold
 
240
<b>bold text</b>
 
241
++
 
242
**bold text**
 
243
++++
 
244
strong
 
245
<strong>strong text</strong>
 
246
++
 
247
**strong text**
 
248
++++
 
249
italic
 
250
<i>italic text</i>
 
251
++
 
252
//italic text//
 
253
++++
 
254
emphasized
 
255
<em>em text</em>
 
256
++
 
257
//em text//
 
258
++++
 
259
ul
 
260
<ul>
 
261
  <li>one
 
262
  <li>two
 
263
  <li>three
 
264
</ul>
 
265
++
 
266
  * one 
 
267
  * two 
 
268
  * three
 
269
++++
 
270
ul (nested)
 
271
<ul>
 
272
  <li>1
 
273
    <ul>
 
274
      <li>1.a
 
275
      <li>1.b
 
276
    </ul>
 
277
  </li>
 
278
  <li>2
 
279
  <li>3
 
280
</ul>
 
281
++
 
282
  * 1   
 
283
    * 1.a 
 
284
    * 1.b  
 
285
  * 2 
 
286
  * 3
 
287
++++
 
288
ol
 
289
<ol>
 
290
  <li>one
 
291
  <li>two
 
292
  <li>three
 
293
</ol>
 
294
++
 
295
  - one 
 
296
  - two 
 
297
  - three
 
298
++++
 
299
ol (nested)
 
300
<ol>
 
301
  <li>1
 
302
    <ol>
 
303
      <li>1.a
 
304
      <li>1.b
 
305
    </ol>
 
306
  </li>
 
307
  <li>2
 
308
  <li>3
 
309
</ol>
 
310
++
 
311
  - 1   
 
312
    - 1.a 
 
313
    - 1.b  
 
314
  - 2 
 
315
  - 3
 
316
++++
 
317
ul/ol combo
 
318
<ol>
 
319
  <li>1
 
320
    <ul>
 
321
      <li>1.a
 
322
      <li>1.b
 
323
    </ul>
 
324
  </li>
 
325
  <li>2
 
326
  <li>3
 
327
</ol>
 
328
++
 
329
  - 1 
 
330
    * 1.a 
 
331
    * 1.b 
 
332
  - 2 
 
333
  - 3
 
334
++++
 
335
ol/ul combo
 
336
<ul>
 
337
  <li>1
 
338
    <ol>
 
339
      <li>1.a
 
340
      <li>1.b
 
341
    </ol>
 
342
  </li>
 
343
  <li>2
 
344
  <li>3
 
345
</ul>
 
346
++
 
347
  * 1 
 
348
    - 1.a 
 
349
    - 1.b 
 
350
  * 2 
 
351
  * 3