2020-04-01 20:02:49 +00:00
|
|
|
!! Version 2
|
|
|
|
# Force the test runner to ensure the extension is loaded
|
|
|
|
# Use '#switch' to do the detection, since we might not have
|
|
|
|
# string functions enabled (yet) -- they are force-enabled on a per-test
|
|
|
|
# basis by the ParserTestGlobals hook.
|
2010-07-09 21:11:54 +00:00
|
|
|
!! functionhooks
|
2020-04-01 20:02:49 +00:00
|
|
|
switch
|
2010-07-09 21:11:54 +00:00
|
|
|
!! endfunctionhooks
|
|
|
|
|
2020-04-01 20:02:49 +00:00
|
|
|
# @todo expand
|
|
|
|
|
2010-07-09 21:11:54 +00:00
|
|
|
!! test
|
|
|
|
#len
|
2020-04-01 20:02:49 +00:00
|
|
|
!! wikitext
|
2010-07-09 21:11:54 +00:00
|
|
|
{{#len:}}
|
|
|
|
{{#len:0}}
|
|
|
|
{{#len:test}}
|
2020-04-01 20:02:49 +00:00
|
|
|
!! html
|
2010-07-09 21:11:54 +00:00
|
|
|
<p>0
|
|
|
|
1
|
|
|
|
4
|
|
|
|
</p>
|
|
|
|
!! end
|
|
|
|
|
|
|
|
!! test
|
|
|
|
#urldecode
|
2020-04-01 20:02:49 +00:00
|
|
|
!! wikitext
|
2010-07-09 21:11:54 +00:00
|
|
|
{{#urldecode:}}
|
|
|
|
{{#urldecode:foo%20bar}}
|
|
|
|
{{#urldecode:%D0%9C%D0%B5%D0%B4%D0%B8%D0%B0%D0%92%D0%B8%D0%BA%D0%B8}}
|
|
|
|
{{#urldecode: some unescaped string}}
|
2020-04-01 20:02:49 +00:00
|
|
|
!! html
|
2010-07-09 21:11:54 +00:00
|
|
|
<p>foo bar
|
|
|
|
МедиаВики
|
|
|
|
some unescaped string
|
|
|
|
</p>
|
|
|
|
!! end
|
|
|
|
|
2018-11-15 16:09:15 +00:00
|
|
|
!! test
|
|
|
|
#pos
|
2020-04-01 20:02:49 +00:00
|
|
|
!! wikitext
|
2018-11-15 16:09:15 +00:00
|
|
|
{{#pos:Žmržlina|žlina}}
|
|
|
|
{{#pos:stringstring|str|4}}
|
2020-04-01 20:02:49 +00:00
|
|
|
!! html
|
2018-11-15 16:09:15 +00:00
|
|
|
<p>3
|
|
|
|
6
|
|
|
|
</p>
|
|
|
|
!! end
|
|
|
|
|
|
|
|
!! test
|
|
|
|
#pos with too large offset (T209600)
|
2020-04-01 20:02:49 +00:00
|
|
|
!! wikitext
|
2018-11-15 16:09:15 +00:00
|
|
|
{{#pos:FooBar|Foo|32}}
|
2020-04-01 20:02:49 +00:00
|
|
|
!! html
|
2018-11-15 16:09:15 +00:00
|
|
|
|
|
|
|
!! end
|