summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Poem/poemParserTests.txt
blob: 266dd614f45b8e5d684df2fb5e31af6fd11e0705 (plain)
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
# Force the test runner to ensure the extension is loaded
!! hooks
poem
!! endhooks

#Regression tests for existing functionality, to ensure nothing was broken.
!! test
<poem>
!! input
<poem>
this
is
a
test
</poem>
!! result
<div class="poem">
<p>this<br />
is<br />
a<br />
test
</p>
</div>

!! end

!!test
  <poem> with recursive parsing
!!input
<poem>
this ''is'' a '''test'''
</poem>
!! result
<div class="poem">
<p>this <i>is</i> a <b>test</b>
</p>
</div>

!!end


!!test
  <poem> with leading whitespace
!!input
<poem>

   test

</poem>
!! result
<div class="poem">
<p><br />
&#160;&#160;&#160;test<br />
</p>
</div>

!!end

!!test
Horizontal rule
!!input
<poem>
some
-----
text
</poem>
!!result
<div class="poem">
<p>some<br />
</p>
<hr /><br />
<p>text
</p>
</div>

!!end

#test for new poem/nowiki feature; should fail without new enhancement.
!! test 2
example of <nowiki> without <poem>
!!options
disabled
!! input
<nowiki>
this
is
a
test
</nowiki>
!! result
<p>
this
is
a
test

</p>
!! end

!! test
  nested <poem><nowiki>
!! input
<poem><nowiki>
this
is
a
test
</nowiki></poem>
!! result
<div class="poem">
<p><br />
this<br />
is<br />
a<br />
test<br />

</p>
</div>

!!end

!! test 5
  nested <poem><nowiki> with formatting
!! input
<poem><nowiki>
this
'''is'''
a
test
</nowiki></poem>
!! result
<div class="poem">
<p><br />
this<br />
'''is'''<br />
a<br />
test<br />

</p>
</div>

!! end