1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257
|
local $/;
require 't/runtests.pl';
runtests( data => <DATA>, dialect => 'MoinMoin' );
close DATA;
__DATA__
add space between [[BR]] and URL
__H__
<html><a href="http://example.com">http://example.com</a><br /></html>
__W__
http://example.com [[BR]]
__NEXT__
wrap in html
__H__
<a href="http://google.com">GOOGLE</a><br/>
NewLine
__W__
[[http://google.com|GOOGLE]][[BR]] NewLine
__NEXT__
bold
__H__
<html><b>bold</b></html>
__W__
'''bold'''
__NEXT__
italics
__H__
<html><i>italics</i></html>
__W__
''italics''
__NEXT__
bold and italics
__H__
<html><b>bold</b> and <i>italics</i></html>
__W__
'''bold''' and ''italics''
__NEXT__
bold-italics nested
__H__
<html><i><b>bold-italics</b> nested</i></html>
__W__
'''''bold-italics''' nested''
__NEXT__
strong
__H__
<html><strong>strong</strong></html>
__W__
'''strong'''
__NEXT__
emphasized
__H__
<html><em>emphasized</em></html>
__W__
''emphasized''
__NEXT__
underlined
__H__
<html><u>text</u></html>
__W__
__text__
__NEXT__
one-line phrasals
__H__
<html><i>phrasals
in one line</i></html>
__W__
''phrasals in one line''
__NEXT__
sup
__H__
<html>x<sup>2</sup></html>
__W__
x^2^
__NEXT__
sub
__H__
<html>H<sub>2</sub>O</html>
__W__
H,,2,,O
__NEXT__
code
__H__
<html><code>$name = 'stan';</code></html>
__W__
`$name = 'stan';`
__NEXT__
tt
__H__
<html><tt>tt text</tt></html>
__W__
`tt text`
__NEXT__
small
__H__
<html>some <small>small</small> text</html>
__W__
some ~-small-~ text
__NEXT__
big
__H__
<html>some <big>big</big> text</html>
__W__
some ~+big+~ text
__NEXT__
paragraph blocking
__H__
<html><p>p1</p><p>p2</p></html>
__W__
p1
p2
__NEXT__
lists
__H__
<html><ul><li>1</li><li>2</li></ul></html>
__W__
* 1
* 2
__NEXT__
nested lists
__H__
<html><ul><li>1<ul><li>1a</li><li>1b</li></ul></li><li>2</li></ul>
__W__
* 1
* 1a
* 1b
* 2
__NEXT__
nested lists (different types)
__H__
<html><ul><li>1<ul><li>a<ol><li>i</li></ol></li><li>b</li></ul></li><li>2</li></ul></html>
__W__
* 1
* a
1. i
* b
* 2
__NEXT__
hr
__H__
<html><hr /></html>
__W__
----
__NEXT__
pre
__H__
<html><pre>this
is
preformatted
text</pre></html>
__W__
{{{
this
is
preformatted
text
}}}
__NEXT__
h1
__H__
<h1>h1</h1>
__W__
= h1 =
__NEXT__
h2
__H__
<h2>h2</h2>
__W__
== h2 ==
__NEXT__
h3
__H__
<h3>h3</h3>
__W__
=== h3 ===
__NEXT__
h4
__H__
<h4>h4</h4>
__W__
==== h4 ====
__NEXT__
h5
__H__
<h5>h5</h5>
__W__
===== h5 =====
__NEXT__
h6
__H__
<h6>h6</h6>
__W__
====== h6 ======
__NEXT__
img
__H__
<html><img src="thing.gif" /></html>
__W__
http://www.test.com/thing.gif
__NEXT__
external links
__H__
<html><a href="test.html">thing</a></html>
__W__
[[http://www.test.com/test.html|thing]]
__NEXT__
external link (plain)
__H__
<html><a href="http://www.test.com">http://www.test.com</a></html>
__W__
http://www.test.com
__NEXT__
definition list
__H__
<html><dl><dt>cookies</dt><dd>delicious delicacies</dd></dl></html>
__W__
cookies:: delicious delicacies
__NEXT__
simple table
__H__
<html><table><tr><td>name</td><td>david</td></tr></table>
__W__
|| name || david ||
__NEXT__
table w/ attrs
__H__
<html>
<table bgcolor="white" width="100%">
<tr>
<td colspan=2 id="thing">thing</td>
</tr>
<tr>
<td>next</td>
<td id="crazy">crazy</td>
</tr>
</table>
</html>
__W__
||<-2 tablestyle="background-color:white; width:100%" id="thing"> thing ||
|| next ||<id="crazy"> crazy ||
__NEXT__
anchors with content (bug #29347) ::enable_anchor_macro(1)
__H__
<a id="top">This is the top of the page</a>
__W__
<<Anchor(top)>>
This is the top of the page
__NEXT__
anchors (bug #17813) ::enable_anchor_macro(1)
__H__
<a id="id-top" name="name-top"></a>
<p><a href="#href-top">Top of page</a></p>
__W__
<<Anchor(id-top)>>
[[#href-top|Top of page]]
|