@curly-message/conformance 1.0.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +266 -0
- package/bin/conformance.js +37 -0
- package/bin/manifest.js +24 -0
- package/dist/index.d.ts +225 -0
- package/dist/index.js +4 -0
- package/fixtures/comparisons.json +916 -0
- package/fixtures/conversion.json +231 -0
- package/fixtures/escaping-extensions.json +84 -0
- package/fixtures/escaping.json +546 -0
- package/fixtures/extensions.json +826 -0
- package/fixtures/fallback-intl.json +51 -0
- package/fixtures/fallback.json +774 -0
- package/fixtures/grammar.json +875 -0
- package/fixtures/intl.json +3057 -0
- package/fixtures/limits.json +63 -0
- package/fixtures/nesting.json +251 -0
- package/fixtures/reports.json +512 -0
- package/fixtures/resolution.json +742 -0
- package/fixtures/security-extensions.json +52 -0
- package/fixtures/security.json +246 -0
- package/fixtures/whitespace.json +1000 -0
- package/index.json +102 -0
- package/package.json +76 -0
- package/schema/fixture.schema.json +264 -0
|
@@ -0,0 +1,1000 @@
|
|
|
1
|
+
{
|
|
2
|
+
"format": "curly-message-1",
|
|
3
|
+
"level": "core",
|
|
4
|
+
"section": "8",
|
|
5
|
+
"cases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "whitespace/key-padding",
|
|
8
|
+
"description": "Whitespace surrounding the key is not significant, so the padded spelling is not the key looked up.",
|
|
9
|
+
"message": "{{ v }}",
|
|
10
|
+
"payload": {
|
|
11
|
+
" v ": "PADDED",
|
|
12
|
+
"v": "HIT"
|
|
13
|
+
},
|
|
14
|
+
"expected": {
|
|
15
|
+
"output": "HIT"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "whitespace/modifier-name-padding",
|
|
20
|
+
"description": "Whitespace surrounding the modifier name is not significant.",
|
|
21
|
+
"message": "{{v: eq ; a:A; default:D}}",
|
|
22
|
+
"payload": {
|
|
23
|
+
"v": "a"
|
|
24
|
+
},
|
|
25
|
+
"expected": {
|
|
26
|
+
"output": "A"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "whitespace/option-key-padding",
|
|
31
|
+
"description": "Whitespace surrounding an option key is not significant.",
|
|
32
|
+
"message": "{{v; a :A; default:D}}",
|
|
33
|
+
"payload": {
|
|
34
|
+
"v": "a"
|
|
35
|
+
},
|
|
36
|
+
"expected": {
|
|
37
|
+
"output": "A"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "whitespace/inline-default-key-padding",
|
|
42
|
+
"description": "Whitespace surrounding the inline default key is not significant, so the segment is still the inline default.",
|
|
43
|
+
"message": "{{v; default :D}}",
|
|
44
|
+
"payload": {},
|
|
45
|
+
"expected": {
|
|
46
|
+
"output": "D"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"id": "whitespace/option-value-padding",
|
|
51
|
+
"description": "Whitespace surrounding an option value is not significant.",
|
|
52
|
+
"message": "{{v; a: A ; default:D}}",
|
|
53
|
+
"payload": {
|
|
54
|
+
"v": "a"
|
|
55
|
+
},
|
|
56
|
+
"expected": {
|
|
57
|
+
"output": "A"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "whitespace/inline-default-value-padding",
|
|
62
|
+
"description": "Whitespace surrounding the inline default value is not significant.",
|
|
63
|
+
"message": "{{v; default: D }}",
|
|
64
|
+
"payload": {},
|
|
65
|
+
"expected": {
|
|
66
|
+
"output": "D"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "whitespace/option-value-inner-kept",
|
|
71
|
+
"description": "Whitespace inside an option value is significant.",
|
|
72
|
+
"message": "{{v; a:X Y; default:D}}",
|
|
73
|
+
"payload": {
|
|
74
|
+
"v": "a"
|
|
75
|
+
},
|
|
76
|
+
"expected": {
|
|
77
|
+
"output": "X Y"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"id": "whitespace/inline-default-inner-kept",
|
|
82
|
+
"description": "Whitespace inside an inline default value is significant while the whitespace around every part of the placeholder is not.",
|
|
83
|
+
"message": "{{ value : eq ; option1 : VALUE1 ; option2 : VALUE2 ; default : DEFAULT VALUE ;}}",
|
|
84
|
+
"payload": {},
|
|
85
|
+
"expected": {
|
|
86
|
+
"output": "DEFAULT VALUE"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "whitespace/spaced-selection",
|
|
91
|
+
"description": "A selection padded around its key, modifier name, option keys and option values selects as the unpadded one does.",
|
|
92
|
+
"message": "{{ value : eq ; option1 : VALUE1 ; option2 : VALUE2 ; default : DEFAULT VALUE ;}}",
|
|
93
|
+
"payload": {
|
|
94
|
+
"value": "option2"
|
|
95
|
+
},
|
|
96
|
+
"expected": {
|
|
97
|
+
"output": "VALUE2"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"id": "whitespace/outside-placeholder-is-text",
|
|
102
|
+
"description": "The rules apply within a placeholder, so whitespace around one is text.",
|
|
103
|
+
"message": "\u3000{{v}}\u3000",
|
|
104
|
+
"payload": {
|
|
105
|
+
"v": "HIT"
|
|
106
|
+
},
|
|
107
|
+
"expected": {
|
|
108
|
+
"output": "\u3000HIT\u3000"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "whitespace/value-untouched",
|
|
113
|
+
"description": "A value is not a part of the placeholder, so its whitespace is kept.",
|
|
114
|
+
"message": "[{{v}}]",
|
|
115
|
+
"payload": {
|
|
116
|
+
"v": " x "
|
|
117
|
+
},
|
|
118
|
+
"expected": {
|
|
119
|
+
"output": "[ x ]"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"id": "whitespace/u0009-pads-every-part",
|
|
124
|
+
"description": "U+0009 (character tabulation) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
125
|
+
"message": "{{\u0009v\u0009:\u0009eq\u0009;\u0009a\u0009:\u0009A\u0009;\u0009default\u0009:\u0009D\u0009}}",
|
|
126
|
+
"payload": {
|
|
127
|
+
"v": "a",
|
|
128
|
+
"\u0009v\u0009": "PADDED"
|
|
129
|
+
},
|
|
130
|
+
"expected": {
|
|
131
|
+
"output": "A"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "whitespace/u000b-pads-every-part",
|
|
136
|
+
"description": "U+000B (line tabulation) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
137
|
+
"message": "{{\u000bv\u000b:\u000beq\u000b;\u000ba\u000b:\u000bA\u000b;\u000bdefault\u000b:\u000bD\u000b}}",
|
|
138
|
+
"payload": {
|
|
139
|
+
"v": "a",
|
|
140
|
+
"\u000bv\u000b": "PADDED"
|
|
141
|
+
},
|
|
142
|
+
"expected": {
|
|
143
|
+
"output": "A"
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "whitespace/u000c-pads-every-part",
|
|
148
|
+
"description": "U+000C (form feed) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
149
|
+
"message": "{{\u000cv\u000c:\u000ceq\u000c;\u000ca\u000c:\u000cA\u000c;\u000cdefault\u000c:\u000cD\u000c}}",
|
|
150
|
+
"payload": {
|
|
151
|
+
"v": "a",
|
|
152
|
+
"\u000cv\u000c": "PADDED"
|
|
153
|
+
},
|
|
154
|
+
"expected": {
|
|
155
|
+
"output": "A"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"id": "whitespace/u0020-pads-every-part",
|
|
160
|
+
"description": "U+0020 (space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
161
|
+
"message": "{{ v : eq ; a : A ; default : D }}",
|
|
162
|
+
"payload": {
|
|
163
|
+
"v": "a",
|
|
164
|
+
" v ": "PADDED"
|
|
165
|
+
},
|
|
166
|
+
"expected": {
|
|
167
|
+
"output": "A"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"id": "whitespace/u00a0-pads-every-part",
|
|
172
|
+
"description": "U+00A0 (no-break space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
173
|
+
"message": "{{\u00a0v\u00a0:\u00a0eq\u00a0;\u00a0a\u00a0:\u00a0A\u00a0;\u00a0default\u00a0:\u00a0D\u00a0}}",
|
|
174
|
+
"payload": {
|
|
175
|
+
"v": "a",
|
|
176
|
+
"\u00a0v\u00a0": "PADDED"
|
|
177
|
+
},
|
|
178
|
+
"expected": {
|
|
179
|
+
"output": "A"
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"id": "whitespace/u1680-pads-every-part",
|
|
184
|
+
"description": "U+1680 (ogham space mark) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
185
|
+
"message": "{{\u1680v\u1680:\u1680eq\u1680;\u1680a\u1680:\u1680A\u1680;\u1680default\u1680:\u1680D\u1680}}",
|
|
186
|
+
"payload": {
|
|
187
|
+
"v": "a",
|
|
188
|
+
"\u1680v\u1680": "PADDED"
|
|
189
|
+
},
|
|
190
|
+
"expected": {
|
|
191
|
+
"output": "A"
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"id": "whitespace/u2000-pads-every-part",
|
|
196
|
+
"description": "U+2000 (en quad) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
197
|
+
"message": "{{\u2000v\u2000:\u2000eq\u2000;\u2000a\u2000:\u2000A\u2000;\u2000default\u2000:\u2000D\u2000}}",
|
|
198
|
+
"payload": {
|
|
199
|
+
"v": "a",
|
|
200
|
+
"\u2000v\u2000": "PADDED"
|
|
201
|
+
},
|
|
202
|
+
"expected": {
|
|
203
|
+
"output": "A"
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"id": "whitespace/u2001-pads-every-part",
|
|
208
|
+
"description": "U+2001 (em quad) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
209
|
+
"message": "{{\u2001v\u2001:\u2001eq\u2001;\u2001a\u2001:\u2001A\u2001;\u2001default\u2001:\u2001D\u2001}}",
|
|
210
|
+
"payload": {
|
|
211
|
+
"v": "a",
|
|
212
|
+
"\u2001v\u2001": "PADDED"
|
|
213
|
+
},
|
|
214
|
+
"expected": {
|
|
215
|
+
"output": "A"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"id": "whitespace/u2002-pads-every-part",
|
|
220
|
+
"description": "U+2002 (en space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
221
|
+
"message": "{{\u2002v\u2002:\u2002eq\u2002;\u2002a\u2002:\u2002A\u2002;\u2002default\u2002:\u2002D\u2002}}",
|
|
222
|
+
"payload": {
|
|
223
|
+
"v": "a",
|
|
224
|
+
"\u2002v\u2002": "PADDED"
|
|
225
|
+
},
|
|
226
|
+
"expected": {
|
|
227
|
+
"output": "A"
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"id": "whitespace/u2003-pads-every-part",
|
|
232
|
+
"description": "U+2003 (em space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
233
|
+
"message": "{{\u2003v\u2003:\u2003eq\u2003;\u2003a\u2003:\u2003A\u2003;\u2003default\u2003:\u2003D\u2003}}",
|
|
234
|
+
"payload": {
|
|
235
|
+
"v": "a",
|
|
236
|
+
"\u2003v\u2003": "PADDED"
|
|
237
|
+
},
|
|
238
|
+
"expected": {
|
|
239
|
+
"output": "A"
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"id": "whitespace/u2004-pads-every-part",
|
|
244
|
+
"description": "U+2004 (three-per-em space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
245
|
+
"message": "{{\u2004v\u2004:\u2004eq\u2004;\u2004a\u2004:\u2004A\u2004;\u2004default\u2004:\u2004D\u2004}}",
|
|
246
|
+
"payload": {
|
|
247
|
+
"v": "a",
|
|
248
|
+
"\u2004v\u2004": "PADDED"
|
|
249
|
+
},
|
|
250
|
+
"expected": {
|
|
251
|
+
"output": "A"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"id": "whitespace/u2005-pads-every-part",
|
|
256
|
+
"description": "U+2005 (four-per-em space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
257
|
+
"message": "{{\u2005v\u2005:\u2005eq\u2005;\u2005a\u2005:\u2005A\u2005;\u2005default\u2005:\u2005D\u2005}}",
|
|
258
|
+
"payload": {
|
|
259
|
+
"v": "a",
|
|
260
|
+
"\u2005v\u2005": "PADDED"
|
|
261
|
+
},
|
|
262
|
+
"expected": {
|
|
263
|
+
"output": "A"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"id": "whitespace/u2006-pads-every-part",
|
|
268
|
+
"description": "U+2006 (six-per-em space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
269
|
+
"message": "{{\u2006v\u2006:\u2006eq\u2006;\u2006a\u2006:\u2006A\u2006;\u2006default\u2006:\u2006D\u2006}}",
|
|
270
|
+
"payload": {
|
|
271
|
+
"v": "a",
|
|
272
|
+
"\u2006v\u2006": "PADDED"
|
|
273
|
+
},
|
|
274
|
+
"expected": {
|
|
275
|
+
"output": "A"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"id": "whitespace/u2007-pads-every-part",
|
|
280
|
+
"description": "U+2007 (figure space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
281
|
+
"message": "{{\u2007v\u2007:\u2007eq\u2007;\u2007a\u2007:\u2007A\u2007;\u2007default\u2007:\u2007D\u2007}}",
|
|
282
|
+
"payload": {
|
|
283
|
+
"v": "a",
|
|
284
|
+
"\u2007v\u2007": "PADDED"
|
|
285
|
+
},
|
|
286
|
+
"expected": {
|
|
287
|
+
"output": "A"
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"id": "whitespace/u2008-pads-every-part",
|
|
292
|
+
"description": "U+2008 (punctuation space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
293
|
+
"message": "{{\u2008v\u2008:\u2008eq\u2008;\u2008a\u2008:\u2008A\u2008;\u2008default\u2008:\u2008D\u2008}}",
|
|
294
|
+
"payload": {
|
|
295
|
+
"v": "a",
|
|
296
|
+
"\u2008v\u2008": "PADDED"
|
|
297
|
+
},
|
|
298
|
+
"expected": {
|
|
299
|
+
"output": "A"
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"id": "whitespace/u2009-pads-every-part",
|
|
304
|
+
"description": "U+2009 (thin space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
305
|
+
"message": "{{\u2009v\u2009:\u2009eq\u2009;\u2009a\u2009:\u2009A\u2009;\u2009default\u2009:\u2009D\u2009}}",
|
|
306
|
+
"payload": {
|
|
307
|
+
"v": "a",
|
|
308
|
+
"\u2009v\u2009": "PADDED"
|
|
309
|
+
},
|
|
310
|
+
"expected": {
|
|
311
|
+
"output": "A"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"id": "whitespace/u200a-pads-every-part",
|
|
316
|
+
"description": "U+200A (hair space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
317
|
+
"message": "{{\u200av\u200a:\u200aeq\u200a;\u200aa\u200a:\u200aA\u200a;\u200adefault\u200a:\u200aD\u200a}}",
|
|
318
|
+
"payload": {
|
|
319
|
+
"v": "a",
|
|
320
|
+
"\u200av\u200a": "PADDED"
|
|
321
|
+
},
|
|
322
|
+
"expected": {
|
|
323
|
+
"output": "A"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"id": "whitespace/u202f-pads-every-part",
|
|
328
|
+
"description": "U+202F (narrow no-break space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
329
|
+
"message": "{{\u202fv\u202f:\u202feq\u202f;\u202fa\u202f:\u202fA\u202f;\u202fdefault\u202f:\u202fD\u202f}}",
|
|
330
|
+
"payload": {
|
|
331
|
+
"v": "a",
|
|
332
|
+
"\u202fv\u202f": "PADDED"
|
|
333
|
+
},
|
|
334
|
+
"expected": {
|
|
335
|
+
"output": "A"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"id": "whitespace/u205f-pads-every-part",
|
|
340
|
+
"description": "U+205F (medium mathematical space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
341
|
+
"message": "{{\u205fv\u205f:\u205feq\u205f;\u205fa\u205f:\u205fA\u205f;\u205fdefault\u205f:\u205fD\u205f}}",
|
|
342
|
+
"payload": {
|
|
343
|
+
"v": "a",
|
|
344
|
+
"\u205fv\u205f": "PADDED"
|
|
345
|
+
},
|
|
346
|
+
"expected": {
|
|
347
|
+
"output": "A"
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"id": "whitespace/u3000-pads-every-part",
|
|
352
|
+
"description": "U+3000 (ideographic space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
353
|
+
"message": "{{\u3000v\u3000:\u3000eq\u3000;\u3000a\u3000:\u3000A\u3000;\u3000default\u3000:\u3000D\u3000}}",
|
|
354
|
+
"payload": {
|
|
355
|
+
"v": "a",
|
|
356
|
+
"\u3000v\u3000": "PADDED"
|
|
357
|
+
},
|
|
358
|
+
"expected": {
|
|
359
|
+
"output": "A"
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"id": "whitespace/ufeff-pads-every-part",
|
|
364
|
+
"description": "U+FEFF (zero width no-break space) surrounding the key, the modifier name, the option key, the option value and the inline default is not significant.",
|
|
365
|
+
"message": "{{\ufeffv\ufeff:\ufeffeq\ufeff;\ufeffa\ufeff:\ufeffA\ufeff;\ufeffdefault\ufeff:\ufeffD\ufeff}}",
|
|
366
|
+
"payload": {
|
|
367
|
+
"v": "a",
|
|
368
|
+
"\ufeffv\ufeff": "PADDED"
|
|
369
|
+
},
|
|
370
|
+
"expected": {
|
|
371
|
+
"output": "A"
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"id": "whitespace/u0009-escaped-is-text",
|
|
376
|
+
"description": "U+0009 (character tabulation) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
377
|
+
"message": "{{v\\\u0009x; \\\u0009:\\\u0009ONE\\\u0009; default:D}}",
|
|
378
|
+
"payload": {
|
|
379
|
+
"v\u0009x": "\u0009"
|
|
380
|
+
},
|
|
381
|
+
"expected": {
|
|
382
|
+
"output": "\u0009ONE\u0009"
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"id": "whitespace/u000b-escaped-is-text",
|
|
387
|
+
"description": "U+000B (line tabulation) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
388
|
+
"message": "{{v\\\u000bx; \\\u000b:\\\u000bONE\\\u000b; default:D}}",
|
|
389
|
+
"payload": {
|
|
390
|
+
"v\u000bx": "\u000b"
|
|
391
|
+
},
|
|
392
|
+
"expected": {
|
|
393
|
+
"output": "\u000bONE\u000b"
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
{
|
|
397
|
+
"id": "whitespace/u000c-escaped-is-text",
|
|
398
|
+
"description": "U+000C (form feed) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
399
|
+
"message": "{{v\\\u000cx; \\\u000c:\\\u000cONE\\\u000c; default:D}}",
|
|
400
|
+
"payload": {
|
|
401
|
+
"v\u000cx": "\u000c"
|
|
402
|
+
},
|
|
403
|
+
"expected": {
|
|
404
|
+
"output": "\u000cONE\u000c"
|
|
405
|
+
}
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"id": "whitespace/u0020-escaped-is-text",
|
|
409
|
+
"description": "U+0020 (space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
410
|
+
"message": "{{v\\ x; \\ :\\ ONE\\ ; default:D}}",
|
|
411
|
+
"payload": {
|
|
412
|
+
"v x": " "
|
|
413
|
+
},
|
|
414
|
+
"expected": {
|
|
415
|
+
"output": " ONE "
|
|
416
|
+
}
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"id": "whitespace/u00a0-escaped-is-text",
|
|
420
|
+
"description": "U+00A0 (no-break space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
421
|
+
"message": "{{v\\\u00a0x; \\\u00a0:\\\u00a0ONE\\\u00a0; default:D}}",
|
|
422
|
+
"payload": {
|
|
423
|
+
"v\u00a0x": "\u00a0"
|
|
424
|
+
},
|
|
425
|
+
"expected": {
|
|
426
|
+
"output": "\u00a0ONE\u00a0"
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
"id": "whitespace/u1680-escaped-is-text",
|
|
431
|
+
"description": "U+1680 (ogham space mark) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
432
|
+
"message": "{{v\\\u1680x; \\\u1680:\\\u1680ONE\\\u1680; default:D}}",
|
|
433
|
+
"payload": {
|
|
434
|
+
"v\u1680x": "\u1680"
|
|
435
|
+
},
|
|
436
|
+
"expected": {
|
|
437
|
+
"output": "\u1680ONE\u1680"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"id": "whitespace/u2000-escaped-is-text",
|
|
442
|
+
"description": "U+2000 (en quad) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
443
|
+
"message": "{{v\\\u2000x; \\\u2000:\\\u2000ONE\\\u2000; default:D}}",
|
|
444
|
+
"payload": {
|
|
445
|
+
"v\u2000x": "\u2000"
|
|
446
|
+
},
|
|
447
|
+
"expected": {
|
|
448
|
+
"output": "\u2000ONE\u2000"
|
|
449
|
+
}
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
"id": "whitespace/u2001-escaped-is-text",
|
|
453
|
+
"description": "U+2001 (em quad) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
454
|
+
"message": "{{v\\\u2001x; \\\u2001:\\\u2001ONE\\\u2001; default:D}}",
|
|
455
|
+
"payload": {
|
|
456
|
+
"v\u2001x": "\u2001"
|
|
457
|
+
},
|
|
458
|
+
"expected": {
|
|
459
|
+
"output": "\u2001ONE\u2001"
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"id": "whitespace/u2002-escaped-is-text",
|
|
464
|
+
"description": "U+2002 (en space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
465
|
+
"message": "{{v\\\u2002x; \\\u2002:\\\u2002ONE\\\u2002; default:D}}",
|
|
466
|
+
"payload": {
|
|
467
|
+
"v\u2002x": "\u2002"
|
|
468
|
+
},
|
|
469
|
+
"expected": {
|
|
470
|
+
"output": "\u2002ONE\u2002"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"id": "whitespace/u2003-escaped-is-text",
|
|
475
|
+
"description": "U+2003 (em space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
476
|
+
"message": "{{v\\\u2003x; \\\u2003:\\\u2003ONE\\\u2003; default:D}}",
|
|
477
|
+
"payload": {
|
|
478
|
+
"v\u2003x": "\u2003"
|
|
479
|
+
},
|
|
480
|
+
"expected": {
|
|
481
|
+
"output": "\u2003ONE\u2003"
|
|
482
|
+
}
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"id": "whitespace/u2004-escaped-is-text",
|
|
486
|
+
"description": "U+2004 (three-per-em space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
487
|
+
"message": "{{v\\\u2004x; \\\u2004:\\\u2004ONE\\\u2004; default:D}}",
|
|
488
|
+
"payload": {
|
|
489
|
+
"v\u2004x": "\u2004"
|
|
490
|
+
},
|
|
491
|
+
"expected": {
|
|
492
|
+
"output": "\u2004ONE\u2004"
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
"id": "whitespace/u2005-escaped-is-text",
|
|
497
|
+
"description": "U+2005 (four-per-em space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
498
|
+
"message": "{{v\\\u2005x; \\\u2005:\\\u2005ONE\\\u2005; default:D}}",
|
|
499
|
+
"payload": {
|
|
500
|
+
"v\u2005x": "\u2005"
|
|
501
|
+
},
|
|
502
|
+
"expected": {
|
|
503
|
+
"output": "\u2005ONE\u2005"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"id": "whitespace/u2006-escaped-is-text",
|
|
508
|
+
"description": "U+2006 (six-per-em space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
509
|
+
"message": "{{v\\\u2006x; \\\u2006:\\\u2006ONE\\\u2006; default:D}}",
|
|
510
|
+
"payload": {
|
|
511
|
+
"v\u2006x": "\u2006"
|
|
512
|
+
},
|
|
513
|
+
"expected": {
|
|
514
|
+
"output": "\u2006ONE\u2006"
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"id": "whitespace/u2007-escaped-is-text",
|
|
519
|
+
"description": "U+2007 (figure space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
520
|
+
"message": "{{v\\\u2007x; \\\u2007:\\\u2007ONE\\\u2007; default:D}}",
|
|
521
|
+
"payload": {
|
|
522
|
+
"v\u2007x": "\u2007"
|
|
523
|
+
},
|
|
524
|
+
"expected": {
|
|
525
|
+
"output": "\u2007ONE\u2007"
|
|
526
|
+
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"id": "whitespace/u2008-escaped-is-text",
|
|
530
|
+
"description": "U+2008 (punctuation space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
531
|
+
"message": "{{v\\\u2008x; \\\u2008:\\\u2008ONE\\\u2008; default:D}}",
|
|
532
|
+
"payload": {
|
|
533
|
+
"v\u2008x": "\u2008"
|
|
534
|
+
},
|
|
535
|
+
"expected": {
|
|
536
|
+
"output": "\u2008ONE\u2008"
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"id": "whitespace/u2009-escaped-is-text",
|
|
541
|
+
"description": "U+2009 (thin space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
542
|
+
"message": "{{v\\\u2009x; \\\u2009:\\\u2009ONE\\\u2009; default:D}}",
|
|
543
|
+
"payload": {
|
|
544
|
+
"v\u2009x": "\u2009"
|
|
545
|
+
},
|
|
546
|
+
"expected": {
|
|
547
|
+
"output": "\u2009ONE\u2009"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
"id": "whitespace/u200a-escaped-is-text",
|
|
552
|
+
"description": "U+200A (hair space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
553
|
+
"message": "{{v\\\u200ax; \\\u200a:\\\u200aONE\\\u200a; default:D}}",
|
|
554
|
+
"payload": {
|
|
555
|
+
"v\u200ax": "\u200a"
|
|
556
|
+
},
|
|
557
|
+
"expected": {
|
|
558
|
+
"output": "\u200aONE\u200a"
|
|
559
|
+
}
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"id": "whitespace/u202f-escaped-is-text",
|
|
563
|
+
"description": "U+202F (narrow no-break space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
564
|
+
"message": "{{v\\\u202fx; \\\u202f:\\\u202fONE\\\u202f; default:D}}",
|
|
565
|
+
"payload": {
|
|
566
|
+
"v\u202fx": "\u202f"
|
|
567
|
+
},
|
|
568
|
+
"expected": {
|
|
569
|
+
"output": "\u202fONE\u202f"
|
|
570
|
+
}
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
"id": "whitespace/u205f-escaped-is-text",
|
|
574
|
+
"description": "U+205F (medium mathematical space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
575
|
+
"message": "{{v\\\u205fx; \\\u205f:\\\u205fONE\\\u205f; default:D}}",
|
|
576
|
+
"payload": {
|
|
577
|
+
"v\u205fx": "\u205f"
|
|
578
|
+
},
|
|
579
|
+
"expected": {
|
|
580
|
+
"output": "\u205fONE\u205f"
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"id": "whitespace/u3000-escaped-is-text",
|
|
585
|
+
"description": "U+3000 (ideographic space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
586
|
+
"message": "{{v\\\u3000x; \\\u3000:\\\u3000ONE\\\u3000; default:D}}",
|
|
587
|
+
"payload": {
|
|
588
|
+
"v\u3000x": "\u3000"
|
|
589
|
+
},
|
|
590
|
+
"expected": {
|
|
591
|
+
"output": "\u3000ONE\u3000"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"id": "whitespace/ufeff-escaped-is-text",
|
|
596
|
+
"description": "U+FEFF (zero width no-break space) that an escape sequence claims is text in the key, the option key and the option value.",
|
|
597
|
+
"message": "{{v\\\ufeffx; \\\ufeff:\\\ufeffONE\\\ufeff; default:D}}",
|
|
598
|
+
"payload": {
|
|
599
|
+
"v\ufeffx": "\ufeff"
|
|
600
|
+
},
|
|
601
|
+
"expected": {
|
|
602
|
+
"output": "\ufeffONE\ufeff"
|
|
603
|
+
}
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"id": "whitespace/u0085-is-not-whitespace",
|
|
607
|
+
"description": "U+0085 (next line) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
608
|
+
"message": "{{\u0085v\u0085; a:\u0085; default:D}}",
|
|
609
|
+
"payload": {
|
|
610
|
+
"\u0085v\u0085": "a"
|
|
611
|
+
},
|
|
612
|
+
"expected": {
|
|
613
|
+
"output": "\u0085"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"id": "whitespace/u001f-is-not-whitespace",
|
|
618
|
+
"description": "U+001F (information separator one) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
619
|
+
"message": "{{\u001fv\u001f; a:\u001f; default:D}}",
|
|
620
|
+
"payload": {
|
|
621
|
+
"\u001fv\u001f": "a"
|
|
622
|
+
},
|
|
623
|
+
"expected": {
|
|
624
|
+
"output": "\u001f"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"id": "whitespace/u180e-is-not-whitespace",
|
|
629
|
+
"description": "U+180E (mongolian vowel separator) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
630
|
+
"message": "{{\u180ev\u180e; a:\u180e; default:D}}",
|
|
631
|
+
"payload": {
|
|
632
|
+
"\u180ev\u180e": "a"
|
|
633
|
+
},
|
|
634
|
+
"expected": {
|
|
635
|
+
"output": "\u180e"
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"id": "whitespace/u200b-is-not-whitespace",
|
|
640
|
+
"description": "U+200B (zero width space) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
641
|
+
"message": "{{\u200bv\u200b; a:\u200b; default:D}}",
|
|
642
|
+
"payload": {
|
|
643
|
+
"\u200bv\u200b": "a"
|
|
644
|
+
},
|
|
645
|
+
"expected": {
|
|
646
|
+
"output": "\u200b"
|
|
647
|
+
}
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"id": "whitespace/u2060-is-not-whitespace",
|
|
651
|
+
"description": "U+2060 (word joiner) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
652
|
+
"message": "{{\u2060v\u2060; a:\u2060; default:D}}",
|
|
653
|
+
"payload": {
|
|
654
|
+
"\u2060v\u2060": "a"
|
|
655
|
+
},
|
|
656
|
+
"expected": {
|
|
657
|
+
"output": "\u2060"
|
|
658
|
+
}
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
"id": "whitespace/u00ad-is-not-whitespace",
|
|
662
|
+
"description": "U+00AD (soft hyphen) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
663
|
+
"message": "{{\u00adv\u00ad; a:\u00ad; default:D}}",
|
|
664
|
+
"payload": {
|
|
665
|
+
"\u00adv\u00ad": "a"
|
|
666
|
+
},
|
|
667
|
+
"expected": {
|
|
668
|
+
"output": "\u00ad"
|
|
669
|
+
}
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"id": "whitespace/u2800-is-not-whitespace",
|
|
673
|
+
"description": "U+2800 (braille pattern blank) is outside the class: it pads a key into a different key and is a non-empty option value.",
|
|
674
|
+
"message": "{{\u2800v\u2800; a:\u2800; default:D}}",
|
|
675
|
+
"payload": {
|
|
676
|
+
"\u2800v\u2800": "a"
|
|
677
|
+
},
|
|
678
|
+
"expected": {
|
|
679
|
+
"output": "\u2800"
|
|
680
|
+
}
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"id": "whitespace/escaped-space-in-key",
|
|
684
|
+
"description": "An escaped space belongs to the key.",
|
|
685
|
+
"message": "{{v\\ x; default:D}}",
|
|
686
|
+
"payload": {
|
|
687
|
+
"v x": "HIT",
|
|
688
|
+
"vx": "NO"
|
|
689
|
+
},
|
|
690
|
+
"expected": {
|
|
691
|
+
"output": "HIT"
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"id": "whitespace/escaped-space-as-option-key",
|
|
696
|
+
"description": "An escaped space is an option key of its own, not a key that trims away.",
|
|
697
|
+
"message": "{{v; \\ :X; default:D}}",
|
|
698
|
+
"payload": {
|
|
699
|
+
"v": " "
|
|
700
|
+
},
|
|
701
|
+
"expected": {
|
|
702
|
+
"output": "X"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"id": "whitespace/escaped-space-around-value",
|
|
707
|
+
"description": "An escaped space at either end of an option value is text the trimming does not remove.",
|
|
708
|
+
"message": "{{v; 1:\\ ONE\\ }}",
|
|
709
|
+
"payload": {
|
|
710
|
+
"v": 1
|
|
711
|
+
},
|
|
712
|
+
"expected": {
|
|
713
|
+
"output": " ONE "
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"id": "whitespace/escaped-space-in-inline-default",
|
|
718
|
+
"description": "An escaped space at the start of an inline default is text the trimming does not remove.",
|
|
719
|
+
"message": "{{v; default:\\ D}}",
|
|
720
|
+
"payload": {},
|
|
721
|
+
"expected": {
|
|
722
|
+
"output": " D"
|
|
723
|
+
}
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"id": "whitespace/unclaimed-space-after-escape-is-padding",
|
|
727
|
+
"description": "An escape sequence claims one code point, so whitespace past an escaped space is still padding.",
|
|
728
|
+
"message": "{{v; 1:ONE\\ }}",
|
|
729
|
+
"payload": {
|
|
730
|
+
"v": 1
|
|
731
|
+
},
|
|
732
|
+
"expected": {
|
|
733
|
+
"output": "ONE "
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"id": "whitespace/padding-after-escaped-colon-in-value",
|
|
738
|
+
"description": "Whitespace after an escape sequence that claims a colon is still padding around the value.",
|
|
739
|
+
"message": "{{v; 1:ONE\\: }}",
|
|
740
|
+
"payload": {
|
|
741
|
+
"v": 1
|
|
742
|
+
},
|
|
743
|
+
"expected": {
|
|
744
|
+
"output": "ONE:"
|
|
745
|
+
}
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
"id": "whitespace/padding-after-escaped-colon-in-key",
|
|
749
|
+
"description": "Whitespace after an escape sequence that claims a colon is still padding around the key.",
|
|
750
|
+
"message": "{{v\\: ; default:D}}",
|
|
751
|
+
"payload": {
|
|
752
|
+
"v:": "HIT"
|
|
753
|
+
},
|
|
754
|
+
"expected": {
|
|
755
|
+
"output": "HIT"
|
|
756
|
+
}
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
"id": "whitespace/shorthand-option-absent-value",
|
|
760
|
+
"description": "Over an absent value the shorthand is never compared, because ne takes the fallback chain like every other modifier.",
|
|
761
|
+
"section": "11.1",
|
|
762
|
+
"message": "{{v:ne; z; default:DEF}}",
|
|
763
|
+
"payload": {},
|
|
764
|
+
"expected": {
|
|
765
|
+
"output": "DEF"
|
|
766
|
+
}
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
"id": "whitespace/shorthand-option-trimmed",
|
|
770
|
+
"description": "A valueless option is trimmed by the whitespace class, and the value it stands for is the trimmed key.",
|
|
771
|
+
"message": "{{v:ne; z ; default:D}}",
|
|
772
|
+
"payload": {
|
|
773
|
+
"v": "a"
|
|
774
|
+
},
|
|
775
|
+
"expected": {
|
|
776
|
+
"output": "z"
|
|
777
|
+
}
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"id": "whitespace/nbsp-value-trims",
|
|
781
|
+
"description": "U+00A0, though typed on purpose, trims away like any other member when it is the whole value.",
|
|
782
|
+
"section": "A.4",
|
|
783
|
+
"message": "{{v; x:\u00a0; default:D}}",
|
|
784
|
+
"payload": {
|
|
785
|
+
"v": "x"
|
|
786
|
+
},
|
|
787
|
+
"expected": {
|
|
788
|
+
"output": ""
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"id": "whitespace/nbsp-value-escaped",
|
|
793
|
+
"description": "An author who means U+00A0 as the value escapes it.",
|
|
794
|
+
"section": "A.4",
|
|
795
|
+
"message": "{{v; x:\\\u00a0; default:D}}",
|
|
796
|
+
"payload": {
|
|
797
|
+
"v": "x"
|
|
798
|
+
},
|
|
799
|
+
"expected": {
|
|
800
|
+
"output": "\u00a0"
|
|
801
|
+
}
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"id": "whitespace/ideographic-space-value-trims",
|
|
805
|
+
"description": "U+3000, though typed on purpose, trims away like any other member when it is the whole value.",
|
|
806
|
+
"section": "A.4",
|
|
807
|
+
"message": "{{v; x:\u3000; default:D}}",
|
|
808
|
+
"payload": {
|
|
809
|
+
"v": "x"
|
|
810
|
+
},
|
|
811
|
+
"expected": {
|
|
812
|
+
"output": ""
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
"id": "whitespace/ideographic-space-value-escaped",
|
|
817
|
+
"description": "An author who means U+3000 as the value escapes it.",
|
|
818
|
+
"section": "A.4",
|
|
819
|
+
"message": "{{v; x:\\\u3000; default:D}}",
|
|
820
|
+
"payload": {
|
|
821
|
+
"v": "x"
|
|
822
|
+
},
|
|
823
|
+
"expected": {
|
|
824
|
+
"output": "\u3000"
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"id": "whitespace/run-of-members-trims",
|
|
829
|
+
"description": "A run of every member around a key trims like a single one.",
|
|
830
|
+
"message": "{{\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeffv\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff}}",
|
|
831
|
+
"payload": {
|
|
832
|
+
"v": "HIT",
|
|
833
|
+
"\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeffv\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff": "PADDED"
|
|
834
|
+
},
|
|
835
|
+
"expected": {
|
|
836
|
+
"output": "HIT"
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"id": "whitespace/run-value-is-empty",
|
|
841
|
+
"description": "An option value made of every member trims away to nothing.",
|
|
842
|
+
"message": "{{v; a:\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff; default:D}}",
|
|
843
|
+
"payload": {
|
|
844
|
+
"v": "a"
|
|
845
|
+
},
|
|
846
|
+
"expected": {
|
|
847
|
+
"output": ""
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"id": "whitespace/run-modifier-name-and-segment",
|
|
852
|
+
"description": "A modifier name and a segment made of every member name nothing, so the placeholder is a plain substitution.",
|
|
853
|
+
"message": "{{v:\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff;\u0009\u000b\u000c \u00a0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff}}",
|
|
854
|
+
"payload": {
|
|
855
|
+
"v": "HIT"
|
|
856
|
+
},
|
|
857
|
+
"expected": {
|
|
858
|
+
"output": "HIT"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
"id": "whitespace/empty-modifier-name",
|
|
863
|
+
"description": "A colon with nothing after it names no modifier, so the placeholder is a plain substitution.",
|
|
864
|
+
"message": "{{v:}}",
|
|
865
|
+
"payload": {
|
|
866
|
+
"v": "HIT"
|
|
867
|
+
},
|
|
868
|
+
"expected": {
|
|
869
|
+
"output": "HIT"
|
|
870
|
+
}
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"id": "whitespace/blank-modifier-name",
|
|
874
|
+
"description": "A modifier name that trims away to nothing names no modifier, so the placeholder is a plain substitution.",
|
|
875
|
+
"message": "{{v: }}",
|
|
876
|
+
"payload": {
|
|
877
|
+
"v": "HIT"
|
|
878
|
+
},
|
|
879
|
+
"expected": {
|
|
880
|
+
"output": "HIT"
|
|
881
|
+
}
|
|
882
|
+
},
|
|
883
|
+
{
|
|
884
|
+
"id": "whitespace/empty-modifier-name-with-options",
|
|
885
|
+
"description": "A colon naming no modifier leaves a placeholder with options to eq.",
|
|
886
|
+
"message": "{{v:; a:A; default:D}}",
|
|
887
|
+
"payload": {
|
|
888
|
+
"v": "a"
|
|
889
|
+
},
|
|
890
|
+
"expected": {
|
|
891
|
+
"output": "A"
|
|
892
|
+
}
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
"id": "whitespace/empty-segment",
|
|
896
|
+
"description": "An empty segment declares no option, so the placeholder is a plain substitution.",
|
|
897
|
+
"message": "{{v;;}}",
|
|
898
|
+
"payload": {
|
|
899
|
+
"v": "HIT"
|
|
900
|
+
},
|
|
901
|
+
"expected": {
|
|
902
|
+
"output": "HIT"
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"id": "whitespace/blank-segment",
|
|
907
|
+
"description": "A segment that trims away to nothing declares no option, so the placeholder is a plain substitution.",
|
|
908
|
+
"message": "{{v; }}",
|
|
909
|
+
"payload": {
|
|
910
|
+
"v": "HIT"
|
|
911
|
+
},
|
|
912
|
+
"expected": {
|
|
913
|
+
"output": "HIT"
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
"id": "whitespace/blank-option-key-with-value",
|
|
918
|
+
"description": "A segment whose key is empty declares no option even with a value, so the placeholder stays a plain substitution.",
|
|
919
|
+
"message": "{{v; :X}}",
|
|
920
|
+
"payload": {
|
|
921
|
+
"v": "HIT"
|
|
922
|
+
},
|
|
923
|
+
"expected": {
|
|
924
|
+
"output": "HIT"
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
"id": "whitespace/equivalent-spellings",
|
|
929
|
+
"description": "A placeholder with and without a trailing semicolon, padded or not, is the same placeholder.",
|
|
930
|
+
"message": "VALUES: {{value}}, {{value;}}, {{ value }}, {{ value; }}",
|
|
931
|
+
"payload": {
|
|
932
|
+
"value": "TEST_VALUE"
|
|
933
|
+
},
|
|
934
|
+
"expected": {
|
|
935
|
+
"output": "VALUES: TEST_VALUE, TEST_VALUE, TEST_VALUE, TEST_VALUE"
|
|
936
|
+
}
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"id": "whitespace/equivalent-spellings-default",
|
|
940
|
+
"description": "An inline default with and without a trailing semicolon, padded or not, declares the same default.",
|
|
941
|
+
"message": "VALUES: {{value; default: DEFAULT_VALUE}}, {{value; default: DEFAULT_VALUE;}}, {{ value; default: DEFAULT_VALUE }}, {{ value; default: DEFAULT_VALUE; }}",
|
|
942
|
+
"payload": {},
|
|
943
|
+
"expected": {
|
|
944
|
+
"output": "VALUES: DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE, DEFAULT_VALUE"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"id": "whitespace/line-terminator-lf-is-not-padding",
|
|
949
|
+
"description": "A construct with a line feed around its key is not trimmed: a placeholder holds no line terminator, so the construct is literal text.",
|
|
950
|
+
"section": "A.10",
|
|
951
|
+
"message": "{{\u000av\u000a}}",
|
|
952
|
+
"payload": {
|
|
953
|
+
"v": "HIT",
|
|
954
|
+
"\u000av\u000a": "PADDED"
|
|
955
|
+
},
|
|
956
|
+
"expected": {
|
|
957
|
+
"output": "{{\u000av\u000a}}"
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"id": "whitespace/line-terminator-cr-is-not-padding",
|
|
962
|
+
"description": "A construct with a carriage return around its key is not trimmed: a placeholder holds no line terminator, so the construct is literal text.",
|
|
963
|
+
"section": "A.10",
|
|
964
|
+
"message": "{{\u000dv\u000d}}",
|
|
965
|
+
"payload": {
|
|
966
|
+
"v": "HIT",
|
|
967
|
+
"\u000dv\u000d": "PADDED"
|
|
968
|
+
},
|
|
969
|
+
"expected": {
|
|
970
|
+
"output": "{{\u000dv\u000d}}"
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"id": "whitespace/line-terminator-ls-is-not-padding",
|
|
975
|
+
"description": "A construct with a line separator (U+2028) around its key is not trimmed: a placeholder holds no line terminator, so the construct is literal text.",
|
|
976
|
+
"section": "A.10",
|
|
977
|
+
"message": "{{\u2028v\u2028}}",
|
|
978
|
+
"payload": {
|
|
979
|
+
"v": "HIT",
|
|
980
|
+
"\u2028v\u2028": "PADDED"
|
|
981
|
+
},
|
|
982
|
+
"expected": {
|
|
983
|
+
"output": "{{\u2028v\u2028}}"
|
|
984
|
+
}
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"id": "whitespace/line-terminator-ps-is-not-padding",
|
|
988
|
+
"description": "A construct with a paragraph separator (U+2029) around its key is not trimmed: a placeholder holds no line terminator, so the construct is literal text.",
|
|
989
|
+
"section": "A.10",
|
|
990
|
+
"message": "{{\u2029v\u2029}}",
|
|
991
|
+
"payload": {
|
|
992
|
+
"v": "HIT",
|
|
993
|
+
"\u2029v\u2029": "PADDED"
|
|
994
|
+
},
|
|
995
|
+
"expected": {
|
|
996
|
+
"output": "{{\u2029v\u2029}}"
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
]
|
|
1000
|
+
}
|