summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/InputBox/tests/parser/inputBoxParserTests.txt
blob: 0f2056706215a86a83d4846542553bc9650a9d3d (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
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
!! test
InputBox type=search
!! wikitext
<inputbox>
type=search
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input searchboxInput mw-ui-input mw-ui-input-inline" name="search" type="text" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="go" class="mw-ui-button" value="Try exact match" />&#160;<input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /></form></div>
!! end

!! test
InputBox type=create
!! wikitext
<inputbox>
type=create
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with minor
!! wikitext
<inputbox>
type=create
minor=1
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="1" name="minor" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with minor=0
!! wikitext
<inputbox>
type=create
minor=0
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="0" name="minor" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with preloadparams
!! wikitext
<inputbox>
type=create
preloadparams[]=param1
preloadparams[]=param2
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="param1" name="preloadparams[]" /><input type="hidden" value="param2" name="preloadparams[]" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with empty preloadparams
!! wikitext
<inputbox>
type=create
preloadparams[]=
preloadparams[]=
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="preloadparams[]" /><input type="hidden" name="preloadparams[]" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with editintro
!! wikitext
<inputbox>
type=create
editintro=MediaWiki:Test
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="MediaWiki:Test" name="editintro" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with empty editintro
!! wikitext
<inputbox>
type=create
editintro=
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="editintro" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with summary
!! wikitext
<inputbox>
type=create
summary=Summary test
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="Summary test" name="summary" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with empty summary
!! wikitext
<inputbox>
type=create
summary=
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="summary" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with nosummary
!! wikitext
<inputbox>
type=create
nosummary=true
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="true" name="nosummary" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with empty nosummary
!! wikitext
<inputbox>
type=create
nosummary=
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="nosummary" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with prefix
!! wikitext
<inputbox>
type=create
prefix=Test/
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="Test/" name="prefix" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with empty prefix
!! wikitext
<inputbox>
type=create
prefix=
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with preload
!! wikitext
<inputbox>
type=create
preload=test
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="test" name="preload" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=create with empty preload
!! wikitext
<inputbox>
type=create
preload=
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" name="preload" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Create page" /></form></div>
!! end

!! test
InputBox type=comment
!! wikitext
<inputbox>
type=comment
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="hidden" value="new" name="section" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="New section" /></form></div>
!! end

!! test
InputBox type=commenttitle
!! wikitext
<inputbox>
type=commenttitle
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="commentbox" class="commentbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="text" name="preloadtitle" class="mw-inputbox-input commentboxInput mw-ui-input mw-ui-input-inline" value="" placeholder="" size="50" dir="ltr" /><input type="hidden" value="new" name="section" /><input type="hidden" name="title" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive" value="New section" /></form></div>
!! end

!! test
InputBox type=fulltext
!! wikitext
<inputbox>
type=fulltext
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input searchboxInput mw-ui-input mw-ui-input-inline" name="search" type="text" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /><input type="hidden" value="Search" name="fulltext" /></form></div>
!! end

!! test
InputBox type=move
!! wikitext
<inputbox>
type=move
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="movebox" class="mw-movebox" action="/index.php" method="get"><input type="hidden" value="Special:MovePage/" name="title" /><input type="hidden" name="wpReason" /><input type="hidden" name="prefix" /><input type="text" name="wpNewTitle" class="mw-inputbox-input mw-moveboxInput mw-ui-input mw-ui-input-inline" value="" placeholder="" size="50" dir="ltr" /><br /><input type="submit" class="mw-ui-button mw-ui-progressive" value="Move page" /></form></div>
!! end

!! test
InputBox type=search with tour
!! wikitext
<inputbox>
type=search
tour=test
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="searchbox" class="searchbox" action="/wiki/Special:Search"><input class="mw-inputbox-input searchboxInput mw-ui-input mw-ui-input-inline" name="search" type="text" value="" placeholder="" size="50" dir="ltr" /><input type="hidden" value="test" name="tour" /><br /><input type="submit" name="go" class="mw-ui-button" value="Try exact match" />&#160;<input type="submit" name="fulltext" class="mw-ui-button" value="Search full text" /></form></div>
!! end

!! test
InputBox langconvert
!! options
language=sr variant=sr-el
!! wikitext
<inputbox>
type=create
default=-{sr-el: Some latin; sr-ec: Not latin }-
placeholder=-{sr-el: el; sr-ec: ec}-
</inputbox>
!! html+tidy
<div class="mw-inputbox-centered" style=""><form name="createbox" class="createbox" action="/index.php" method="get"><input type="hidden" value="edit" name="action" /><input type="text" name="title" class="mw-inputbox-input mw-ui-input mw-ui-input-inline createboxInput" value="Some latin" placeholder="el" size="50" dir="ltr" /><br /><input type="submit" name="create" class="mw-ui-button mw-ui-progressive createboxButton" value="Направи страницу" /></form></div>
!! end