Skip to content

Commit deb4f29

Browse files
rubensworksgkellogg
authored andcommitted
Update templates and vocab to use expectErrorCode, and regen test HTML
1 parent a9ebd99 commit deb4f29

File tree

5 files changed

+69
-12
lines changed

5 files changed

+69
-12
lines changed

tests/expand-manifest.html

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4961,6 +4961,62 @@ <h2>
49614961
</dd>
49624962
</dl>
49634963
</dd>
4964+
<dt id='te048'>
4965+
Test te048 Invalid term as relative IRI
4966+
</dt>
4967+
<dd>
4968+
<dl class='entry'>
4969+
<dt>id</dt>
4970+
<dd>#te048</dd>
4971+
<dt>Type</dt>
4972+
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
4973+
<dt>Purpose</dt>
4974+
<dd>Verifies that a relative IRI cannot be used as a term.</dd>
4975+
<dt>input</dt>
4976+
<dd>
4977+
<a href='expand/e048-in.jsonld'>expand/e048-in.jsonld</a>
4978+
</dd>
4979+
<dt>expect</dt>
4980+
<dd>
4981+
invalid IRI mapping
4982+
</dd>
4983+
<dt>Options</dt>
4984+
<dd>
4985+
<dl class='options'>
4986+
<dt>specVersion</dt>
4987+
<dd>json-ld-1.1</dd>
4988+
</dl>
4989+
</dd>
4990+
</dl>
4991+
</dd>
4992+
<dt id='te049'>
4993+
Test te049 A relative IRI cannot be used as a prefix
4994+
</dt>
4995+
<dd>
4996+
<dl class='entry'>
4997+
<dt>id</dt>
4998+
<dd>#te049</dd>
4999+
<dt>Type</dt>
5000+
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
5001+
<dt>Purpose</dt>
5002+
<dd>Verifies that a relative IRI cannot be used as a term.</dd>
5003+
<dt>input</dt>
5004+
<dd>
5005+
<a href='expand/e049-in.jsonld'>expand/e049-in.jsonld</a>
5006+
</dd>
5007+
<dt>expect</dt>
5008+
<dd>
5009+
invalid term definition
5010+
</dd>
5011+
<dt>Options</dt>
5012+
<dd>
5013+
<dl class='options'>
5014+
<dt>specVersion</dt>
5015+
<dd>json-ld-1.1</dd>
5016+
</dl>
5017+
</dd>
5018+
</dl>
5019+
</dd>
49645020
<dt id='tec01'>
49655021
Test tec01 Invalid keyword in term definition
49665022
</dt>

tests/template.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
%dt="expect"
178178
%dd
179179
- if entry['@type'].to_s.include?('Negative')
180-
=entry['expect']
180+
=entry['expectErrorCode']
181181
- else
182182
%a{href: entry['expect']}=entry['expect']
183183
- if entry['option']

tests/vocab.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@id": "jld:Test",
6363
"rdfs:label": "Superclass of all JSON-LD tests",
6464
"@type": "rdfs:Class",
65-
"rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option."
65+
"rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" and \"expectErrorCode\" for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option."
6666
},
6767
{
6868
"@id": "jld:useNativeTypes",
@@ -108,7 +108,7 @@
108108
"rdfs:label": "Positive Evaluation Test",
109109
"@type": "rdfs:Class",
110110
"rdfs:subClassOf": "jld:Test",
111-
"rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expect\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests."
111+
"rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expectErrorCode\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests."
112112
},
113113
{
114114
"@id": "jld:HtmlTest",
@@ -318,8 +318,8 @@ <h2>Test Case Classes</h2>
318318
<dt><strong>Negative Syntax Test</strong></dt>
319319
<dd><p>A type of test specifically for syntax testing. Syntax tests are not required to have an associated result, only an action. Negative syntax tests are tests of which the result should be a parser error.</p>
320320
</dd>
321-
<dt><strong>Positive Evaluation Test</strong></dt>
322-
<dd><p>A Negative Evaluation test is successful when the result of processing the input file specified as <code>mf:action</code> (aliased as &quot;input&quot; in test manifest) results in the error identified by the literal value of <code>mf:result</code> (aliased as &quot;expect&quot; in test manifest). The specifics of invoking test, including the interpretation of options (<code>:option</code>) and other input files are specified through another class. See the <a href="https://w3c.github.io/json-ld-api/tests/">README</a> for more details on running tests.</p>
321+
<dt><strong>Negative Evaluation Test</strong></dt>
322+
<dd><p>A Negative Evaluation test is successful when the result of processing the input file specified as <code>mf:action</code> (aliased as &quot;input&quot; in test manifest) results in the error identified by the literal value of <code>mf:result</code> (aliased as &quot;expectErrorCode&quot; in test manifest). The specifics of invoking test, including the interpretation of options (<code>:option</code>) and other input files are specified through another class. See the <a href="https://w3c.github.io/json-ld-api/tests/">README</a> for more details on running tests.</p>
323323
</dd>
324324
<dt><strong>Positive Evaluation Test</strong></dt>
325325
<dd><p>A Positive Evaluation test is successful when the result of processing the input file specified as <code>mf:action</code> (aliased as &quot;input&quot; in test manifest) exactly matches the output file specified as <code>mf:result</code> (aliased as &quot;expect&quot; in test manifest) using the comparison defined in another class. The specifics of invoking test, including the interpretation of options (<code>:option</code>) and other input files are specified through another class.</p>
@@ -331,7 +331,7 @@ <h2>Test Case Classes</h2>
331331
<dd><p>Options passed to the test runner to affect invocation of the appropriate API method.</p>
332332
</dd>
333333
<dt><strong>Superclass of all JSON-LD tests</strong></dt>
334-
<dd><p>All JSON-LD tests have an input file referenced using <code>mf:action</code> (aliased as &quot;input&quot; in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using <code>mf:result</code> (aliased as &quot;expect&quot; in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to &quot;json-ld-1.1&quot;, unless specified explicitly as a test option.</p>
334+
<dd><p>All JSON-LD tests have an input file referenced using <code>mf:action</code> (aliased as &quot;input&quot; in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using <code>mf:result</code> (aliased as &quot;expect&quot; and &quot;expectErrorCode&quot; for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to &quot;json-ld-1.1&quot;, unless specified explicitly as a test option.</p>
335335
</dd>
336336
<dt><strong>To RDF Evaluation Test</strong></dt>
337337
<dd><p>A <code>ToRDFTest</code> modifies either a <code>PositiveEvaluationTest</code>, <code>NegativeEvaluationTest</code>, <code>PositiveSyntaxTest</code> or <code>NegativeSyntaxTest</code>.</p>

tests/vocab.jsonld

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@id": "jld:Test",
5757
"rdfs:label": "Superclass of all JSON-LD tests",
5858
"@type": "rdfs:Class",
59-
"rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option."
59+
"rdfs:comment": "All JSON-LD tests have an input file referenced using `mf:action` (aliased as \"input\" in test manifest). Positive and Negative Evaluation Tests also have a result file referenced using `mf:result` (aliased as \"expect\" and \"expectErrorCode\" for respectively Positive and Negative Evaluation Tests in test manifest). Other tests may take different inputs and options as defined for each test class. Tests should be run with the processingMode option set to \"json-ld-1.1\", unless specified explicitly as a test option."
6060
},
6161
{
6262
"@id": "jld:useNativeTypes",
@@ -99,10 +99,10 @@
9999
},
100100
{
101101
"@id": "jld:NegativeEvaluationTest",
102-
"rdfs:label": "Positive Evaluation Test",
102+
"rdfs:label": "Negative Evaluation Test",
103103
"@type": "rdfs:Class",
104104
"rdfs:subClassOf": "jld:Test",
105-
"rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expect\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests."
105+
"rdfs:comment": "A Negative Evaluation test is successful when the result of processing the input file specified as `mf:action` (aliased as \"input\" in test manifest) results in the error identified by the literal value of `mf:result` (aliased as \"expectErrorCode\" in test manifest). The specifics of invoking test, including the interpretation of options (`:option`) and other input files are specified through another class. See the [README](https://w3c.github.io/json-ld-api/tests/) for more details on running tests."
106106
},
107107
{
108108
"@id": "jld:HtmlTest",

tests/vocab.ttl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
All JSON-LD tests have an input file referenced using
2626
`mf:action` (aliased as "input" in test manifest).
2727
Positive and Negative Evaluation Tests also have a result file
28-
referenced using `mf:result` (aliased as "expect" in test manifest).
28+
referenced using `mf:result` (aliased as "expect" and "expectErrorCode" for
29+
respectively Positive and Negative Evaluation Tests in test manifest).
2930
Other tests may take different inputs and options as defined for each test class.
3031
Tests should be run with the processingMode option set to "json-ld-1.1",
3132
unless specified explicitly as a test option.
@@ -44,13 +45,13 @@
4445
""" .
4546

4647
:NegativeEvaluationTest a rdfs:Class ;
47-
rdfs:label "Positive Evaluation Test" ;
48+
rdfs:label "Negative Evaluation Test" ;
4849
rdfs:subClassOf :Test ;
4950
rdfs:comment """
5051
A Negative Evaluation test is successful when the result of processing
5152
the input file specified as `mf:action` (aliased as "input" in test manifest)
5253
results in the error identified by the literal value of
53-
`mf:result` (aliased as "expect" in test manifest).
54+
`mf:result` (aliased as "expectErrorCode" in test manifest).
5455
The specifics of invoking test, including
5556
the interpretation of options (`:option`) and other input files are
5657
specified through another class.

0 commit comments

Comments
 (0)