Skip to content

Fix error codes in tests being emitted as IRIs #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions tests/compact-manifest.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@
"option": {"specVersion": "json-ld-1.0"},
"input": "compact/e001-in.jsonld",
"context": "compact/e001-context.jsonld",
"expect": "compaction to list of lists"
"expectErrorCode": "compaction to list of lists"
}, {
"@id": "#te002",
"@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ],
Expand All @@ -1255,15 +1255,15 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/e002-in.jsonld",
"context": "compact/e002-context.jsonld",
"expect": "IRI confused with prefix"
"expectErrorCode": "IRI confused with prefix"
}, {
"@id": "#ten01",
"@type": [ "jld:NegativeEvaluationTest", "jld:CompactTest" ],
"name": "Nest term not defined",
"purpose": "Transparent Nesting",
"input": "compact/en01-in.jsonld",
"context": "compact/en01-context.jsonld",
"expect": "invalid @nest value",
"expectErrorCode": "invalid @nest value",
"option": {"specVersion": "json-ld-1.1"}
}, {
"@id": "#tep05",
Expand All @@ -1272,7 +1272,7 @@
"purpose": "If processingMode is explicitly json-ld-1.0, it will conflict with 1.1 features.",
"input": "compact/ep05-in.jsonld",
"context": "compact/ep05-context.jsonld",
"expect": "processing mode conflict",
"expectErrorCode": "processing mode conflict",
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"}
}, {
"@id": "#tep06",
Expand All @@ -1282,7 +1282,7 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/ep06-in.jsonld",
"context": "compact/ep06-context.jsonld",
"expect": "invalid @version value"
"expectErrorCode": "invalid @version value"
}, {
"@id": "#tep07",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1291,7 +1291,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep07-in.jsonld",
"context": "compact/ep07-context.jsonld",
"expect": "invalid term definition"
"expectErrorCode": "invalid term definition"
}, {
"@id": "#tep08",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1300,7 +1300,7 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/ep08-in.jsonld",
"context": "compact/ep08-context.jsonld",
"expect": "invalid @prefix value"
"expectErrorCode": "invalid @prefix value"
}, {
"@id": "#tep09",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1309,7 +1309,7 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/ep09-in.jsonld",
"context": "compact/ep09-context.jsonld",
"expect": "invalid term definition"
"expectErrorCode": "invalid term definition"
}, {
"@id": "#tep10",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1318,7 +1318,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep10-in.jsonld",
"context": "compact/ep10-context.jsonld",
"expect": "invalid term definition"
"expectErrorCode": "invalid term definition"
}, {
"@id": "#tep11",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1327,7 +1327,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep11-in.jsonld",
"context": "compact/ep11-context.jsonld",
"expect": "invalid term definition"
"expectErrorCode": "invalid term definition"
}, {
"@id": "#tep12",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1336,7 +1336,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep12-in.jsonld",
"context": "compact/ep12-context.jsonld",
"expect": "invalid container mapping"
"expectErrorCode": "invalid container mapping"
}, {
"@id": "#tep13",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1345,7 +1345,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep13-in.jsonld",
"context": "compact/ep13-context.jsonld",
"expect": "invalid container mapping"
"expectErrorCode": "invalid container mapping"
}, {
"@id": "#tep14",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1354,7 +1354,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep14-in.jsonld",
"context": "compact/ep14-context.jsonld",
"expect": "invalid container mapping"
"expectErrorCode": "invalid container mapping"
}, {
"@id": "#tep15",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1363,7 +1363,7 @@
"option": {"processingMode": "json-ld-1.0", "specVersion": "json-ld-1.1"},
"input": "compact/ep15-in.jsonld",
"context": "compact/ep15-context.jsonld",
"expect": "invalid container mapping"
"expectErrorCode": "invalid container mapping"
}, {
"@id": "#tin01",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Expand Down Expand Up @@ -1983,7 +1983,7 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/pr01-in.jsonld",
"context": "compact/pr01-context.jsonld",
"expect": "invalid context nullification"
"expectErrorCode": "invalid context nullification"
}, {
"@id": "#tpr02",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -1992,7 +1992,7 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/pr02-in.jsonld",
"context": "compact/pr02-context.jsonld",
"expect": "protected term redefinition"
"expectErrorCode": "protected term redefinition"
}, {
"@id": "#tpr03",
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
Expand All @@ -2001,7 +2001,7 @@
"option": {"specVersion": "json-ld-1.1"},
"input": "compact/pr03-in.jsonld",
"context": "compact/pr03-context.jsonld",
"expect": "protected term redefinition"
"expectErrorCode": "protected term redefinition"
}, {
"@id": "#tpr04",
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Expand Down
15 changes: 8 additions & 7 deletions tests/context.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"xsd": "http://www.w3.org/2001/XMLSchema#",

"context": { "@type": "@id" },
"expect": { "@id": "mf:result", "@type": "@id" },
"frame": { "@type": "@id" },
"input": { "@id": "mf:action", "@type": "@id" },
"option": { "@type": "@id"},
"sequence": { "@id": "mf:entries", "@type": "@id", "@container": "@list" },
"redirectTo": { "@type": "@id"},
"context": { "@type": "@id" },
"expect": { "@id": "mf:result", "@type": "@id" },
"expectErrorCode": { "@id": "mf:result" },
"frame": { "@type": "@id" },
"input": { "@id": "mf:action", "@type": "@id" },
"option": { "@type": "@id"},
"sequence": { "@id": "mf:entries", "@type": "@id", "@container": "@list" },
"redirectTo": { "@type": "@id"},

"name": "mf:name",
"purpose": "rdfs:comment",
Expand Down
56 changes: 56 additions & 0 deletions tests/expand-manifest.html
Original file line number Diff line number Diff line change
Expand Up @@ -4961,6 +4961,62 @@ <h2>
</dd>
</dl>
</dd>
<dt id='te048'>
Test te048 Invalid term as relative IRI
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te048</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
<dt>Purpose</dt>
<dd>Verifies that a relative IRI cannot be used as a term.</dd>
<dt>input</dt>
<dd>
<a href='expand/e048-in.jsonld'>expand/e048-in.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
invalid IRI mapping
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='te049'>
Test te049 A relative IRI cannot be used as a prefix
</dt>
<dd>
<dl class='entry'>
<dt>id</dt>
<dd>#te049</dd>
<dt>Type</dt>
<dd>jld:NegativeEvaluationTest, jld:ExpandTest</dd>
<dt>Purpose</dt>
<dd>Verifies that a relative IRI cannot be used as a term.</dd>
<dt>input</dt>
<dd>
<a href='expand/e049-in.jsonld'>expand/e049-in.jsonld</a>
</dd>
<dt>expect</dt>
<dd>
invalid term definition
</dd>
<dt>Options</dt>
<dd>
<dl class='options'>
<dt>specVersion</dt>
<dd>json-ld-1.1</dd>
</dl>
</dd>
</dl>
</dd>
<dt id='tec01'>
Test tec01 Invalid keyword in term definition
</dt>
Expand Down
Loading