summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/ParserFunctions/tests/parser/stringFunctionTests.txt
blob: b1fb96512f6223d7d731095891d465cb81aaa9c8 (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
# @todo expand
!! functionhooks
len
!! endfunctionhooks

!! test
#len
!! input
{{#len:}}
{{#len:0}}
{{#len:test}}
!!result
<p>0
1
4
</p>
!! end

!! test
#urldecode
!! input
{{#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}}
!! result
<p>foo bar
МедиаВики
some unescaped string
</p>
!! end

!! test
#pos
!! input
{{#pos:Žmržlina|žlina}}
{{#pos:stringstring|str|4}}
!! result
<p>3
6
</p>
!! end

!! test
#pos with too large offset (T209600)
!! input
{{#pos:FooBar|Foo|32}}
!! result

!! end