blob: 9803eb560c47d317dde7a4e6dbddcbbc7e348995 (
plain) (
blame)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
// Test annotations.
--- basic-annotations ---
// @allow
// @allow identifier
// @allow "quoted"
// @allow("parenthesized")
// @allow unnecessary-stars
#h(0em)
#let _ = {
// @allow unnecessary-stars
h(0em)
}
#let _ = $
// @allow unnecessary-stars
h(#0em)
$
--- multiline-annotations ---
// @allow(
// unnecessary-stars
// "string"
// )
#[**]
--- annotation-comments ---
// Error: 2:17-2:27 unexpected comment inside annotation
// @allow "abc" // comment
// Error: 2:17-2:30 unexpected comment inside annotation
// @allow "abc" /* comment */
// Error: 2:17-2:30 unexpected comment inside annotation
// @allow "abc" /* comment */ "abc"
--- annotation-strings ---
// @allow "@some/thing-there123"
--- unknown-annotation ---
// Error: 2:5-2:13 invalid annotation name
// Hint: 2:5-2:13 must be 'allow'
// @whatever A
--- invalid-annotation-syntax ---
// Error: 2:11-2:12 expected identifier or string in annotation
// @allow *
// Error: 2:11-2:12 expected identifier or string in annotation
// @allow 5
// Error: 2:5-2:19 expected identifier
// @555!**INVALID!
// Error: 2:10-2:13 expected identifier or string in annotation
// @allow)")
// Error: 2:11-2:15 unclosed string
// Error: 2:15 expected closing paren after annotation
// @allow("abc
// Error: 4:12 expected closing paren after annotation
// @allow(
// ident1
// ident2
// Error: 2:16-2:19 unexpected characters after end of annotation
// @allow(abc) abc
// Error: 2:18-2:19 expected identifier, string or closing paren in annotation
// @allow(abc abc, "abc")
--- invalid-annotation-strings ---
// Error: 2:11-2:16 invalid character ' ' in an annotation's string
// @allow "a b"
// Error: 2:11-2:19 invalid character '|' in an annotation's string
// @allow "aaaaa|"
// TODO: Why does this print / instead of \?
// Error: 2:11-2:19 invalid character '/' in an annotation's string
// @allow "aaaaa\"
--- invalid-annotation-in-annotation ---
// Error: 2:17-2:33 unexpected comment inside annotation
// @allow "aaa" // @allow("bbb")
--- allow-suppresses-warns-below ---
// @allow unnecessary-stars
#[**]
// @allow unnecessary-stars
#{
{
[**]
}
}
/**/ // @allow unnecessary-stars
#[**]
// @allow unnecessary-stars
**
--- allow-suppresses-warn-with-tracepoint ---
#let f() = {
text(font: "Unbeknownst")[]
}
#let g() = {
f()
}
// @allow unknown-font-families
#g()
--- allow-suppresses-line-below-but-not-same-line ---
// Warning: 3-5 no text within stars
// Hint: 3-5 using multiple consecutive stars (e.g. **) has no additional effect
#[**] // @allow unnecessary-stars
#[**]
--- allow-before-parbreak-doesnt-suppress-warn ---
// Warning: 4:3-4:5 no text within stars
// Hint: 4:3-4:5 using multiple consecutive stars (e.g. **) has no additional effect
// @allow unnecessary-stars
#[**]
--- allow-before-empty-code-line-doesnt-suppress-warn ---
// Warning: 4:4-4:6 no text within stars
// Hint: 4:4-4:6 using multiple consecutive stars (e.g. **) has no additional effect
#{
// @allow unnecessary-stars
[**]
}
--- unattached-allow-doesnt-suppress-warn ---
// Warning: 1-3 no text within stars
// Hint: 1-3 using multiple consecutive stars (e.g. **) has no additional effect
**
// @allow unnecessary-stars
#h(0em)
// Warning: 3-5 no text within stars
// Hint: 3-5 using multiple consecutive stars (e.g. **) has no additional effect
#[**]
--- allow-doesnt-suppress-warn-in-nested-context ---
// Warning: 2:14-2:27 unknown font family: unbeknownst
#let f() = context {
text(font: "Unbeknownst")[]
}
// @allow unknown-font-families
#f()
// @allow unknown-font-families
#context {
text(font: "Unbeknownst")[]
}
|