summaryrefslogtreecommitdiff
path: root/web/funnelAC/tests/tg04.fw
blob: 9fc4a9defb33217d690542199c870a4d835a99dd (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
TG04: Test macro expansions.

@$@<Teapot@>@{Teapot@}
@$@<One@>@(@1@)@M@{Left @1 Right@}
@$@<Two@>@(@2@)@M@{Left @1 Middle @2 Right@}
@$@<A@>@(@1@)@M@{[@1]@}

@O@<tg04.out@>@{

1. Test macro call with no parameters.
"Teapot" =
"@<Teapot@>"

2. Test macro call with one parameter.
"Left Testing Right" =
"@<One@>@(@"Testing@"@)"

3. Test macro call with many parameters.
"Left x Middle y Right" =
"@<Two@>@(x@,y@)"

4. Test macro call as a parameter of another macro call.
"Left Ostrich Middle Left Wombat Right Right" =
"@<Two@>@(Ostrich@,@<One@>@(Wombat@)@)"

5. Test expression recursive macro call.
"[X[[Walrus]]Y]" =
"@<A@>@(X@<A@>@(@<A@>@(Walrus@)@)Y@)"

@}