| 1 |
PR06: Test the parsing on invocation number constraints. |
| 2 |
|
| 3 |
Trip the parser so we don't get past it. |
| 4 |
@> |
| 5 |
|
| 6 |
1. Test with no zero and no many. |
| 7 |
@$@<Sloth@>@{No zero and no many in this macro@} |
| 8 |
|
| 9 |
2. Test with a zero. |
| 10 |
@$@<Sloth zero@>@Z@{Can be called from 0 to 1 times.@} |
| 11 |
|
| 12 |
3. Test with a many. |
| 13 |
@$@<Sloth many@>@M@{Can be called from 1 to infinity times.@} |
| 14 |
|
| 15 |
4. Test with a zero and a many. |
| 16 |
@$@<Sloth zeromany@>@Z@M@{Can be called from 0 to infinity times.@} |
| 17 |
|
| 18 |
5. Test with a zero and a many but out of order (should give error). |
| 19 |
@$@<Sloth manyzero@>@M@Z@{Oops.@} |
| 20 |
@A@<Error recovery point@> |
| 21 |
|
| 22 |
6. Test with syntactic errors. |
| 23 |
|
| 24 |
@$@<Sloth a@> @M @Z @{Oops.@} |
| 25 |
@A@<Error recovery point@> |
| 26 |
|
| 27 |
@$@<Sloth b@>@Z@Z@{Oops.@} |
| 28 |
@A@<Error recovery point@> |
| 29 |
|
| 30 |
@$@<Sloth c@Z@>@{Oops.@} |
| 31 |
@A@<Error recovery point@> |
| 32 |
|
| 33 |
@$@<Sloth d@>Z@{Oops.@} |
| 34 |
@A@<Error recovery point@> |
| 35 |
|
| 36 |
@$@<Sloth d@>@ZM@{Oops.@} |
| 37 |
@A@<Error recovery point@> |
| 38 |
|
| 39 |
|