Skip to content

Commit 559e654

Browse files
committed
Add requirement type to test manifests (must/should/may).
1 parent 19af567 commit 559e654

6 files changed

+49
-3
lines changed

spec/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@ <h2>Conversion to YAML</h2>
11691169
which will be rooted with either a
11701170
<a>YAML mapping</a> or <a>YAML sequence</a>.
11711171
</p>
1172+
11721173
<p>
11731174
Although outside of the scope of this specification,
11741175
processors MAY use

tests/basic-manifest.html

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ <h1>Test Definitions</h1>
130130
<dt>Purpose</dt><dd>When processing using the YAML-LD JSON profile, documents MUST NOT contain alias nodes.</dd></dt>
131131
<dt>Input</dt><dd><a href="basic/aa-json-aliases-1-negative-in.yamlld">basic/aa-json-aliases-1-negative-in.yamlld</a></dd></dt>
132132
<dt>References</dt><dd>(<a href="../spec/index.html#aa-json-aliases">1</a>) (<a href="../spec/index.html#cir-stream">2</a>) (<a href="../spec/index.html#cir-document">3</a>) (<a href="../spec/index.html#cir-mapping">4</a>)</dd></dt>
133+
<dt>Requirement</dt><dd><strong>must</strong></dd>
133134

134135

135136

@@ -149,6 +150,7 @@ <h1>Test Definitions</h1>
149150
<dt>Purpose</dt><dd>When processing using the YAML-LD JSON profile, documents MUST NOT contain alias nodes.</dd></dt>
150151
<dt>Input</dt><dd><a href="basic/aa-json-aliases-2-negative-in.yamlld">basic/aa-json-aliases-2-negative-in.yamlld</a></dd></dt>
151152
<dt>References</dt><dd>(<a href="../spec/index.html#aa-json-aliases">1</a>) (<a href="../spec/index.html#cir-stream">2</a>) (<a href="../spec/index.html#cir-document">3</a>) (<a href="../spec/index.html#cir-seq">4</a>)</dd></dt>
153+
<dt>Requirement</dt><dd><strong>must</strong></dd>
152154

153155

154156

@@ -168,6 +170,7 @@ <h1>Test Definitions</h1>
168170
<dt>Purpose</dt><dd>Document content MUST be sequence or mapping.</dd></dt>
169171
<dt>Input</dt><dd><a href="basic/cir-document-content-1-negative-in.yamlld">basic/cir-document-content-1-negative-in.yamlld</a></dd></dt>
170172
<dt>References</dt><dd>(<a href="../spec/index.html#cir-document-content">1</a>)</dd></dt>
173+
<dt>Requirement</dt><dd><strong>must</strong></dd>
171174

172175

173176

@@ -187,6 +190,7 @@ <h1>Test Definitions</h1>
187190
<dt>Purpose</dt><dd>A mapping key MUST be a string.</dd></dt>
188191
<dt>Input</dt><dd><a href="basic/cir-mapping-key-1-negative-in.yamlld">basic/cir-mapping-key-1-negative-in.yamlld</a></dd></dt>
189192
<dt>References</dt><dd>(<a href="../spec/index.html#cir-mapping-key">1</a>)</dd></dt>
193+
<dt>Requirement</dt><dd><strong>must</strong></dd>
190194

191195

192196

@@ -205,7 +209,8 @@ <h1>Test Definitions</h1>
205209
<dt>Name</dt><dd>tag:yaml.org.2002 scalars</dd></dt>
206210
<dt>Purpose</dt><dd>Otherwise, the conversion result is mapped through the YAML Core Schema.</dd></dt>
207211
<dt>Input</dt><dd><a href="basic/cir-scalar-core-1-positive-in.yamlld">basic/cir-scalar-core-1-positive-in.yamlld</a></dd></dt>
208-
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-core">1</a>)</dd></dt>
212+
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-json">1</a>)</dd></dt>
213+
<dt>Requirement</dt><dd><strong>must</strong></dd>
209214

210215

211216
<dt>Expect</dt><dd><a href="basic/cir-scalar-core-1-positive-out.yamlld">basic/cir-scalar-core-1-positive-out.yamlld</a></dd>
@@ -224,7 +229,8 @@ <h1>Test Definitions</h1>
224229
<dt>Name</dt><dd>language-tagged string with i18n</dd></dt>
225230
<dt>Purpose</dt><dd>Otherwise, the conversion result is mapped through the YAML Core Schema.</dd></dt>
226231
<dt>Input</dt><dd><a href="basic/cir-scalar-i18n-1-positive-in.yamlld">basic/cir-scalar-i18n-1-positive-in.yamlld</a></dd></dt>
227-
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-core">1</a>)</dd></dt>
232+
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-json">1</a>)</dd></dt>
233+
<dt>Requirement</dt><dd><strong>must</strong></dd>
228234

229235

230236
<dt>Expect</dt><dd><a href="basic/cir-scalar-i18n-1-positive-out.yamlld">basic/cir-scalar-i18n-1-positive-out.yamlld</a></dd>
@@ -243,7 +249,8 @@ <h1>Test Definitions</h1>
243249
<dt>Name</dt><dd>Scalars with other node tags</dd></dt>
244250
<dt>Purpose</dt><dd>Otherwise, the conversion result is mapped through the YAML Core Schema.</dd></dt>
245251
<dt>Input</dt><dd><a href="basic/cir-scalar-other-1-positive-in.yamlld">basic/cir-scalar-other-1-positive-in.yamlld</a></dd></dt>
246-
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-core">1</a>)</dd></dt>
252+
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-json">1</a>)</dd></dt>
253+
<dt>Requirement</dt><dd><strong>must</strong></dd>
247254

248255

249256
<dt>Expect</dt><dd><a href="basic/cir-scalar-other-1-positive-out.yamlld">basic/cir-scalar-other-1-positive-out.yamlld</a></dd>
@@ -263,6 +270,7 @@ <h1>Test Definitions</h1>
263270
<dt>Purpose</dt><dd>Comments are white space.</dd></dt>
264271
<dt>Input</dt><dd><a href="basic/cr-comments-1-positive-in.yamlld">basic/cr-comments-1-positive-in.yamlld</a></dd></dt>
265272
<dt>References</dt><dd>(<a href="../spec/index.html#cr-comments">1</a>)</dd></dt>
273+
<dt>Requirement</dt><dd><strong>must</strong></dd>
266274

267275

268276
<dt>Expect</dt><dd><a href="basic/cr-comments-1-positive-out.yamlld">basic/cr-comments-1-positive-out.yamlld</a></dd>
@@ -282,6 +290,7 @@ <h1>Test Definitions</h1>
282290
<dt>Purpose</dt><dd>A YAML-LD document MUST be encoded in UTF-8, to ensure interoperability with [[JSON]].</dd></dt>
283291
<dt>Input</dt><dd><a href="basic/cr-utf8-1-positive-in.yamlld">basic/cr-utf8-1-positive-in.yamlld</a></dd></dt>
284292
<dt>References</dt><dd>(<a href="../spec/index.html#cr-utf8">1</a>) (<a href="../spec/index.html#jp-utf8">2</a>) (<a href="../spec/index.html#ep-utf8">3</a>)</dd></dt>
293+
<dt>Requirement</dt><dd><strong>must</strong></dd>
285294

286295

287296
<dt>Expect</dt><dd><a href="basic/cr-utf8-1-positive-out.yamlld">basic/cr-utf8-1-positive-out.yamlld</a></dd>
@@ -301,6 +310,7 @@ <h1>Test Definitions</h1>
301310
<dt>Purpose</dt><dd>A YAML-LD document MUST be encoded in UTF-8, to ensure interoperability with [[JSON]].</dd></dt>
302311
<dt>Input</dt><dd><a href="basic/cr-utf8-2-negative-in.yamlld">basic/cr-utf8-2-negative-in.yamlld</a></dd></dt>
303312
<dt>References</dt><dd>(<a href="../spec/index.html#cr-utf8">1</a>) (<a href="../spec/index.html#cir-stream">2</a>) (<a href="../spec/index.html#cir-document">3</a>) (<a href="../spec/index.html#cir-mapping">4</a>) (<a href="../spec/index.html#jp-utf8">5</a>) (<a href="../spec/index.html#ep-utf8">6</a>)</dd></dt>
313+
<dt>Requirement</dt><dd><strong>must</strong></dd>
304314

305315

306316

@@ -320,6 +330,7 @@ <h1>Test Definitions</h1>
320330
<dt>Purpose</dt><dd>All YAML-LD streams MUST form a well-formed stream.</dd></dt>
321331
<dt>Input</dt><dd><a href="basic/cr-well-formed-1-positive-in.yamlld">basic/cr-well-formed-1-positive-in.yamlld</a></dd></dt>
322332
<dt>References</dt><dd>(<a href="../spec/index.html#cr-well-formed">1</a>) (<a href="../spec/index.html#cir-alias-json">2</a>)</dd></dt>
333+
<dt>Requirement</dt><dd><strong>must</strong></dd>
323334

324335

325336
<dt>Expect</dt><dd><a href="basic/cr-well-formed-1-positive-out.yamlld">basic/cr-well-formed-1-positive-out.yamlld</a></dd>
@@ -339,6 +350,7 @@ <h1>Test Definitions</h1>
339350
<dt>Purpose</dt><dd>All YAML-LD streams MUST form a well-formed stream.</dd></dt>
340351
<dt>Input</dt><dd><a href="basic/cr-well-formed-2-negative-in.yamlld">basic/cr-well-formed-2-negative-in.yamlld</a></dd></dt>
341352
<dt>References</dt><dd>(<a href="../spec/index.html#cr-well-formed">1</a>) (<a href="../spec/index.html#cir-stream">2</a>) (<a href="../spec/index.html#cir-document">3</a>) (<a href="../spec/index.html#cir-mapping">4</a>) (<a href="../spec/index.html#cir-alias-json">5</a>)</dd></dt>
353+
<dt>Requirement</dt><dd><strong>must</strong></dd>
342354

343355

344356

tests/basic-manifest.jsonld

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
1212
"name": "Use of alias node",
1313
"purpose": "When processing using the YAML-LD JSON profile, documents MUST NOT contain alias nodes.",
14+
"req": "must",
1415
"input": "basic/aa-json-aliases-1-negative-in.yamlld",
1516
"expectErrorCode": "profile-error"
1617
},
@@ -19,6 +20,7 @@
1920
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
2021
"name": "Use of alias node (in array)",
2122
"purpose": "When processing using the YAML-LD JSON profile, documents MUST NOT contain alias nodes.",
23+
"req": "must",
2224
"input": "basic/aa-json-aliases-2-negative-in.yamlld",
2325
"expectErrorCode": "profile-error"
2426
},
@@ -27,6 +29,7 @@
2729
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
2830
"name": "Document with scalar content.",
2931
"purpose": "Document content MUST be sequence or mapping.",
32+
"req": "must",
3033
"input": "basic/cir-document-content-1-negative-in.yamlld",
3134
"expectErrorCode": "loading document failed"
3235
},
@@ -35,6 +38,7 @@
3538
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
3639
"name": "Mapping with integer key.",
3740
"purpose": "A mapping key MUST be a string.",
41+
"req": "must",
3842
"input": "basic/cir-mapping-key-1-negative-in.yamlld",
3943
"expectErrorCode": "mapping-key-error"
4044
},
@@ -43,6 +47,7 @@
4347
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
4448
"name": "tag:yaml.org.2002 scalars",
4549
"purpose": "Otherwise, the conversion result is mapped through the YAML Core Schema.",
50+
"req": "must",
4651
"input": "basic/cir-scalar-core-1-positive-in.yamlld",
4752
"expect": "basic/cir-scalar-core-1-positive-out.yamlld"
4853
},
@@ -51,6 +56,7 @@
5156
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
5257
"name": "language-tagged string with i18n",
5358
"purpose": "Otherwise, the conversion result is mapped through the YAML Core Schema.",
59+
"req": "must",
5460
"input": "basic/cir-scalar-i18n-1-positive-in.yamlld",
5561
"expect": "basic/cir-scalar-i18n-1-positive-out.yamlld"
5662
},
@@ -59,6 +65,7 @@
5965
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
6066
"name": "Scalars with other node tags",
6167
"purpose": "Otherwise, the conversion result is mapped through the YAML Core Schema.",
68+
"req": "must",
6269
"input": "basic/cir-scalar-other-1-positive-in.yamlld",
6370
"expect": "basic/cir-scalar-other-1-positive-out.yamlld"
6471
},
@@ -67,6 +74,7 @@
6774
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
6875
"name": "Various comment forms",
6976
"purpose": "Comments are white space.",
77+
"req": "must",
7078
"input": "basic/cr-comments-1-positive-in.yamlld",
7179
"expect": "basic/cr-comments-1-positive-out.yamlld"
7280
},
@@ -75,6 +83,7 @@
7583
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
7684
"name": "UTF-8 BOM",
7785
"purpose": "A YAML-LD document MUST be encoded in UTF-8, to ensure interoperability with [[JSON]].",
86+
"req": "must",
7887
"input": "basic/cr-utf8-1-positive-in.yamlld",
7988
"expect": "basic/cr-utf8-1-positive-out.yamlld"
8089
},
@@ -83,6 +92,7 @@
8392
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
8493
"name": "UTF-16 BOM",
8594
"purpose": "A YAML-LD document MUST be encoded in UTF-8, to ensure interoperability with [[JSON]].",
95+
"req": "must",
8696
"input": "basic/cr-utf8-2-negative-in.yamlld",
8797
"expectErrorCode": "invalid encoding"
8898
},
@@ -91,6 +101,7 @@
91101
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
92102
"name": "Load a well-formed document",
93103
"purpose": "All YAML-LD streams MUST form a well-formed stream.",
104+
"req": "must",
94105
"input": "basic/cr-well-formed-1-positive-in.yamlld",
95106
"expect": "basic/cr-well-formed-1-positive-out.yamlld"
96107
},
@@ -99,6 +110,7 @@
99110
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
100111
"name": "Fail to load a non-well-formed stream",
101112
"purpose": "All YAML-LD streams MUST form a well-formed stream.",
113+
"req": "must",
102114
"input": "basic/cr-well-formed-2-negative-in.yamlld",
103115
"expectErrorCode": "loading document failed"
104116
}

tests/extended-manifest.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ <h1>Test Definitions</h1>
130130
<dt>Purpose</dt><dd>A YAML-LD document MAY contain anchored nodes and alias nodes.</dd></dt>
131131
<dt>Input</dt><dd><a href="extended/aa-cycles-1-positive-in.yamlld">extended/aa-cycles-1-positive-in.yamlld</a></dd></dt>
132132
<dt>References</dt><dd>(<a href="../spec/index.html#aa-cycles">1</a>) (<a href="../spec/index.html#aa-json-aliases">2</a>) (<a href="../spec/index.html#cir-alias-cycles">3</a>)</dd></dt>
133+
<dt>Requirement</dt><dd><strong>may</strong></dd>
133134

134135

135136
<dt>Expect</dt><dd><a href="extended/aa-cycles-1-positive-out.yamlld">extended/aa-cycles-1-positive-out.yamlld</a></dd>
@@ -152,6 +153,7 @@ <h1>Test Definitions</h1>
152153
<dt>Purpose</dt><dd>A YAML-LD document ... MUST NOT contain cycles.</dd></dt>
153154
<dt>Input</dt><dd><a href="extended/aa-cycles-2-negative-in.yamlld">extended/aa-cycles-2-negative-in.yamlld</a></dd></dt>
154155
<dt>References</dt><dd>(<a href="../spec/index.html#aa-cycles">1</a>) (<a href="../spec/index.html#cir-stream">2</a>) (<a href="../spec/index.html#cir-document">3</a>) (<a href="../spec/index.html#cir-mapping">4</a>) (<a href="../spec/index.html#cir-alias-cycles">5</a>)</dd></dt>
156+
<dt>Requirement</dt><dd><strong>must</strong></dd>
155157

156158

157159

@@ -174,6 +176,7 @@ <h1>Test Definitions</h1>
174176
<dt>Purpose</dt><dd>Alias nodes MUST be resolved by value to their target nodes.</dd></dt>
175177
<dt>Input</dt><dd><a href="extended/aa-cycles-3-positive-in.yamlld">extended/aa-cycles-3-positive-in.yamlld</a></dd></dt>
176178
<dt>References</dt><dd>(<a href="../spec/index.html#aa-cycles">1</a>) (<a href="../spec/index.html#cir-alias-cycles">2</a>)</dd></dt>
179+
<dt>Requirement</dt><dd><strong>must</strong></dd>
177180

178181

179182
<dt>Expect</dt><dd><a href="extended/aa-cycles-3-positive-out.yamlld">extended/aa-cycles-3-positive-out.yamlld</a></dd>
@@ -196,6 +199,7 @@ <h1>Test Definitions</h1>
196199
<dt>Purpose</dt><dd>If t resolves with a prefix of <code>tag:yaml.org.2002:</code>, the conversion result is mapped through the YAML Core Schema.</dd></dt>
197200
<dt>Input</dt><dd><a href="extended/cir-scalar-core-1-positive-in.yamlld">extended/cir-scalar-core-1-positive-in.yamlld</a></dd></dt>
198201
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-core">1</a>)</dd></dt>
202+
<dt>Requirement</dt><dd><strong>must</strong></dd>
199203

200204

201205
<dt>Expect</dt><dd><a href="extended/cir-scalar-core-1-positive-out.yamlld">extended/cir-scalar-core-1-positive-out.yamlld</a></dd>
@@ -218,6 +222,7 @@ <h1>Test Definitions</h1>
218222
<dt>Purpose</dt><dd>If t resolves with a prefix of <code>tag:yaml.org.2002:</code>, the conversion result is mapped through the YAML Core Schema.</dd></dt>
219223
<dt>Input</dt><dd><a href="extended/cir-scalar-core-2-positive-in.yamlld">extended/cir-scalar-core-2-positive-in.yamlld</a></dd></dt>
220224
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-core">1</a>)</dd></dt>
225+
<dt>Requirement</dt><dd><strong>must</strong></dd>
221226

222227

223228
<dt>Expect</dt><dd><a href="extended/cir-scalar-core-2-positive-out.nq">extended/cir-scalar-core-2-positive-out.nq</a></dd>
@@ -240,6 +245,7 @@ <h1>Test Definitions</h1>
240245
<dt>Purpose</dt><dd>If t resolves with a prefix of <code>https://www.w3.org/ns/i18n#</code>, and the suffix <strong>does not</strong> contain an underscore, the conversion result is a language-tagged string.</dd></dt>
241246
<dt>Input</dt><dd><a href="extended/cir-scalar-i18n-1-positive-in.yamlld">extended/cir-scalar-i18n-1-positive-in.yamlld</a></dd></dt>
242247
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-i18n">1</a>)</dd></dt>
248+
<dt>Requirement</dt><dd><strong>must</strong></dd>
243249

244250

245251
<dt>Expect</dt><dd><a href="extended/cir-scalar-i18n-1-positive-out.yamlld">extended/cir-scalar-i18n-1-positive-out.yamlld</a></dd>
@@ -262,6 +268,7 @@ <h1>Test Definitions</h1>
262268
<dt>Purpose</dt><dd>If t resolves with a prefix of <code>https://www.w3.org/ns/i18n#</code>, and the suffix <strong>does not</strong> contain an underscore, the conversion result is a language-tagged string.</dd></dt>
263269
<dt>Input</dt><dd><a href="extended/cir-scalar-i18n-2-positive-in.yamlld">extended/cir-scalar-i18n-2-positive-in.yamlld</a></dd></dt>
264270
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-i18n">1</a>)</dd></dt>
271+
<dt>Requirement</dt><dd><strong>must</strong></dd>
265272

266273

267274
<dt>Expect</dt><dd><a href="extended/cir-scalar-i18n-2-positive-out.nq">extended/cir-scalar-i18n-2-positive-out.nq</a></dd>
@@ -284,6 +291,7 @@ <h1>Test Definitions</h1>
284291
<dt>Purpose</dt><dd>Otherwise, the conversion result is an RDF literal.</dd></dt>
285292
<dt>Input</dt><dd><a href="extended/cir-scalar-other-1-positive-in.yamlld">extended/cir-scalar-other-1-positive-in.yamlld</a></dd></dt>
286293
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-other">1</a>)</dd></dt>
294+
<dt>Requirement</dt><dd><strong>must</strong></dd>
287295

288296

289297
<dt>Expect</dt><dd><a href="extended/cir-scalar-other-1-positive-out.yamlld">extended/cir-scalar-other-1-positive-out.yamlld</a></dd>
@@ -306,6 +314,7 @@ <h1>Test Definitions</h1>
306314
<dt>Purpose</dt><dd>Otherwise, the conversion result is an RDF literal.</dd></dt>
307315
<dt>Input</dt><dd><a href="extended/cir-scalar-other-2-positive-in.yamlld">extended/cir-scalar-other-2-positive-in.yamlld</a></dd></dt>
308316
<dt>References</dt><dd>(<a href="../spec/index.html#cir-scalar-other">1</a>)</dd></dt>
317+
<dt>Requirement</dt><dd><strong>must</strong></dd>
309318

310319

311320
<dt>Expect</dt><dd><a href="extended/cir-scalar-other-2-positive-out.nq">extended/cir-scalar-other-2-positive-out.nq</a></dd>
@@ -328,6 +337,7 @@ <h1>Test Definitions</h1>
328337
<dt>Purpose</dt><dd>All document MUST use node aliases defined by a previous node.</dd></dt>
329338
<dt>Input</dt><dd><a href="extended/cr-well-formed-3-negative-in.yamlld">extended/cr-well-formed-3-negative-in.yamlld</a></dd></dt>
330339
<dt>References</dt><dd>(<a href="../spec/index.html#cr-well-formed">1</a>) (<a href="../spec/index.html#cir-stream">2</a>) (<a href="../spec/index.html#cir-document">3</a>) (<a href="../spec/index.html#cir-mapping">4</a>)</dd></dt>
340+
<dt>Requirement</dt><dd><strong>must</strong></dd>
331341

332342

333343

0 commit comments

Comments
 (0)