-
Notifications
You must be signed in to change notification settings - Fork 0
/
simpletests.wml
64 lines (55 loc) · 1.28 KB
/
simpletests.wml
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
some outer text
-----------------
{: definition | body :}
-----------------
{:definition|arg1|arg2| body :}
-----------------
{: definition | arg1 | arg2 | body {{{arg1}}} to {{{arg2}}} to {{{arg3:}}} :}
-----------------
{{ invocation }}
-----------------
{{{invocatio55n}}
-----------------
{{ invocation | arg1 }}
-----------------
{{invocation||||||}}
-----------------
{:definition|:}
-----------------
{:definition||||:}
-----------------
{:|:}
-----------------
{{ invocation{{moreinvocation|foo}} | arg1{{bar|{{ping{{{param}}}}}}} }}
-----------------
{{ invocation{:definitio::n|body{{moreinvocation|arg}}}back to body, started with an extra '}' :}
| arg
| arg2
:} still arg2
}}
-----------------
{:
a definition { { : } nothing exciting, still the template name! } { : }
| a parameter
| another parameter
|
a body, starting with whitespace.
: } still the body!
:} ok, back to outer now
-----------------
{:count
|start
|stop
|{{#ifeq
|{{#expr
|{{{start}}}<{{{stop}}}}}
|true
|{{{start}}} {{count|{{#expr|{{{start}}}+1}}|{{{stop}}}}}}}:}
{{count|1|10}}
-----------------
{:fact|n|{{#ifeq|{{#expr|{{{n}}}==0}}|true|1|{{#expr|{{{n}}}*{{fact|{{#expr|{{{n}}}-1}}}}}}}}:}
{:f
|x
|y
|{:a||{{#expr|{{{x}}}+1}}:}{:b||{{#expr|{{{y}}}+1}}:}{{#expr|{{a}}+{{b}}}}:}
{{f|2|3}}=7