Skip to content

Commit f87ef0e

Browse files
committed
Couple of more tests on prefixes.
1 parent e6b5676 commit f87ef0e

7 files changed

+44
-1
lines changed

test-suite/tests/compact-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -888,6 +888,14 @@
888888
"input": "compact-p006-in.jsonld",
889889
"context": "compact-p006-context.jsonld",
890890
"expect": "compact-p006-out.jsonld"
891+
}, {
892+
"@id": "#tp007",
893+
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
894+
"name": "Compact IRI not used as prefix",
895+
"purpose": "Terms including a colon are excluded from being used as a prefix",
896+
"input": "compact-p007-in.jsonld",
897+
"context": "compact-p007-context.jsonld",
898+
"expect": "compact-p007-out.jsonld"
891899
}, {
892900
"@id": "#tr001",
893901
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"@context": {
3+
"foo": "http://example.org/",
4+
"foo:bar": "foo:baz/"
5+
}
6+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@id": "http://example.org/baz/a",
3+
"http://example.org/baz/b": "c"
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": {
3+
"foo": "http://example.org/",
4+
"foo:bar": "foo:baz/"
5+
},
6+
"@id": "foo:baz/a",
7+
"foo:baz/b": "c"
8+
}

test-suite/tests/error-manifest.jsonld

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,20 @@
442442
"@id": "#tp008",
443443
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
444444
"name": "@prefix must be a boolean",
445-
"purpose": "@prefix must be a boolean in a term definition in 1.0",
445+
"purpose": "@prefix must be a boolean in a term definition in 1.1",
446446
"option": {"processingMode": "json-ld-1.1"},
447447
"input": "error-p008-in.jsonld",
448448
"context": "error-p008-context.jsonld",
449449
"expect": "invalid @prefix value"
450+
}, {
451+
"@id": "#tp009",
452+
"@type": ["jld:NegativeEvaluationTest", "jld:CompactTest"],
453+
"name": "@prefix not allowed on compact IRI term",
454+
"purpose": "If processingMode is json-ld-1.0, or if term contains a colon (:), an invalid term definition has been detected and processing is aborted.",
455+
"option": {"processingMode": "json-ld-1.1"},
456+
"input": "error-p009-in.jsonld",
457+
"context": "error-p009-context.jsonld",
458+
"expect": "invalid term definition"
450459
}, {
451460
"@id": "#ts001",
452461
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"@context": {
3+
"foo:bar": {"@id": "http://example/foo/bar/", "@prefix": true}
4+
}
5+
}

test-suite/tests/error-p009-in.jsonld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"http://example/foo/bar/": "bar"
3+
}

0 commit comments

Comments
 (0)