summaryrefslogtreecommitdiff
path: root/web/funnelAC/tests/pr09.fw
blob: f8eb1bd5a535da9372da120dc71e8fda819b48d2 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
PR09: Test calls and actual parameter lists.

First trip up the parser so we don't get any further.
@>

Now define some macros to call. No error.

@$@<Zero@>@{@}
@$@<One@>@(@1@)@{@}
@$@<Two@>@(@2@)@{@}
@$@<Three@>@(@3@)@{@}
@$@<Nine@>@(@9@)@{@}
@$@#"@{@}

The following test calls should NOT generate any errors.

@$@<Macro containing the test macro calls.@>==@{
1. Test macro call with no parameter list.
@<Zero@>

2. Test macro call with quick name.
@#"

3. Test macro call with one parameter.
@<One@>@(Toucan@)

4. Test macro call with many parameters.
@<Two@>@(Toucan@,Teapot@)
@<Three@>@(Toucan@,Teapot@,Walrus@)
@<Nine@>@(Toucan@,Teapot@,Walrus@,
          Toucan@,Teapot@,Walrus@,
          Toucan@,Teapot@,Walrus@)

5. Test macro calls with double quotes on parameters.
@<One@>@( @"Toucan@"@)
@<Two@>@(@"Toucan@"   @,   @"Teapot@"@)
@<Three@>@(@"Toucan@" @,
           @"Teapot@" @,
           @"Walrus@" @)
@<Nine@>@( @"Toucan@" @, @"Teapot@" @, @"Walrus@" @,
           @"Toucan@" @, @"Teapot@" @, @"Walrus@" @,
           @"Toucan@" @, @"Teapot@" @, @"Walrus@" @)

7. Test macro calls with mixed double quotes on parameters.
@<Two@>@(@"Toucan@"   @,Teapot@)
@<Three@>@(@"Toucan@" @,
           @"Teapot@" @,Walrus@)
@<Nine@>@( @"Toucan@" @, @"Teapot@" @,   Walrus   @,
           @"Toucan@" @,   Teapot   @, @"Walrus@" @,
           @"Toucan@" @, @"Teapot@" @, @"Walrus@" @)

@} @! End of macro definition enclosing all these legal tests.

8. Test macro calls with a variety of syntax errors in parameter list.
@$@<Error1@>@{
@<Zero@>@(
@}
@A@<Error recovery point@>

@$@<Error2@>@{
@<Zero@>@)
@}
@A@<Error recovery point@>

@$@<Error3@>@{
@<One@>@(@"Toucan@)
@}
@A@<Error recovery point@>

@$@<Error4@>@{
@<One@>@(@"Toucan@"@"Sloth@"@)
@}
@A@<Error recovery point@>

@$@<Error5@>@{
@<Two@>@(@"Toucan@"Teapot@)
@}
@A@<Error recovery point@>

@$@<Error6@>@{
@<Two@>@(@"Toucan@"Teapot
@}
@A@<Error recovery point@>

@$@<Error7@>@{
@<Two@>@(@"Toucan@"Teapot
@<Three@>@(Toucan@,
           @"Teapot@,Walrus

@}
@A@<Error recovery point@>