| 1 |
TG04: Test macro expansions. |
| 2 |
|
| 3 |
@$@<Teapot@>@{Teapot@} |
| 4 |
@$@<One@>@(@1@)@M@{Left @1 Right@} |
| 5 |
@$@<Two@>@(@2@)@M@{Left @1 Middle @2 Right@} |
| 6 |
@$@<A@>@(@1@)@M@{[@1]@} |
| 7 |
|
| 8 |
@O@<tg04.out@>@{ |
| 9 |
|
| 10 |
1. Test macro call with no parameters. |
| 11 |
"Teapot" = |
| 12 |
"@<Teapot@>" |
| 13 |
|
| 14 |
2. Test macro call with one parameter. |
| 15 |
"Left Testing Right" = |
| 16 |
"@<One@>@(@"Testing@"@)" |
| 17 |
|
| 18 |
3. Test macro call with many parameters. |
| 19 |
"Left x Middle y Right" = |
| 20 |
"@<Two@>@(x@,y@)" |
| 21 |
|
| 22 |
4. Test macro call as a parameter of another macro call. |
| 23 |
"Left Ostrich Middle Left Wombat Right Right" = |
| 24 |
"@<Two@>@(Ostrich@,@<One@>@(Wombat@)@)" |
| 25 |
|
| 26 |
5. Test expression recursive macro call. |
| 27 |
"[X[[Walrus]]Y]" = |
| 28 |
"@<A@>@(X@<A@>@(@<A@>@(Walrus@)@)Y@)" |
| 29 |
|
| 30 |
@} |