Debian Codegraph @

tests/pr08.fw

raw
1 PR08: Test semantic checking of macro definitions.
2
3 Trip parser to be sure that we won't get any output files!
4 @>
5
6 1. File macro has parameters. Error.
7 @O@<Sloth 1@>@(@3@)@{Walrus@}
8 @A@<Error recovery point@>
9
10 2. File macro is additive. Error.
11 @O@<Sloth 2@>+=@{Walrus@}
12 @A@<Error recovery point@>
13
14 3. File macro has too long a name. The test name has 1200 characters. Err.
15 Note: This test can't test the error message if the maximum length of a
16 macro name is less than the maximum length of a file name as the name
17 error is caught first.
18 @p maximum_input_line_length = infinity
19 @O@<123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890@>@{@}
20 @A@<Error recovery point@>
21
22 4. File macro has zero or many attributes. Error.
23 @O@<Sloth 3@>@Z@{Walrus@}
24 @A@<Error recovery point@>
25
26 @O@<Sloth 4@>@M@{Walrus@}
27 @A@<Error recovery point@>
28
29 @O@<Sloth 5@>@Z@M@{Walrus@}
30 @A@<Error recovery point@>
31
32 5. Previous definition is full, current is additive.
33 @$@<Walrus 1@>==@{Sloth@}
34 @$@<Walrus 1@>+=@{Aardvark@}
35 @A@<Error recovery point@>
36
37 6. Previous definition is additive, current is full.
38 @$@<Walrus 2@>+=@{Sloth@}
39 @$@<Walrus 2@>==@{Aardvark@}
40 @A@<Error recovery point@>
41
42 7. Non-first body part of partial has parameter.
43 @$@<Unicorn@>@(@3@)+=@{Turkey@}
44 @$@<Unicorn@>@(@3@)+=@{Turkey@}
45 @A@<Error recovery point@>
46
47 8. Zero or many attributes on non-first body part of additive.
48 @$@<Elephant@>@Z@M+=@{Turkey@}
49 @$@<Elephant@>@Z@M+=@{Turkey@}
50 @A@<Error recovery point@>
51
52 9. Check that non-existent formal parameters are caught.
53
54 @$@<Zero@>@Z@{Sloth@1Walrus@}
55 @A@<Error recovery point@>
56
57 @$@<One@>@(@1@)@Z@{Sloth@2Walrus@}
58 @A@<Error recovery point@>
59
60 @$@<Many@>@(@7@)@Z@{Sloth@8Walrus@}
61 @A@<Error recovery point@>