Skip to content

Commit 59bc33e

Browse files
rubensworksgkellogg
authored andcommitted
Add term scoping test for toRdf
1 parent af09329 commit 59bc33e

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

tests/toRdf-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,14 @@
668668
"input": "toRdf/c034-in.jsonld",
669669
"expect": "toRdf/c034-out.nq",
670670
"option": {"specVersion": "json-ld-1.1"}
671+
}, {
672+
"@id": "#tc035",
673+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
674+
"name": "Term scoping with embedded contexts.",
675+
"purpose": "Terms should make use of @vocab relative to the scope in which the term was defined.",
676+
"input": "toRdf/c035-in.jsonld",
677+
"expect": "toRdf/c035-out.nq",
678+
"option": {"specVersion": "json-ld-1.1"}
671679
}, {
672680
"@id": "#tdi01",
673681
"@type": [ "jld:PositiveEvaluationTest", "jld:ToRDFTest" ],

tests/toRdf/c035-in.jsonld

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://vocab.org/",
4+
"prop1": {}
5+
},
6+
"@id": "ex:outer",
7+
"foo": {
8+
"@context": {
9+
"@vocab": "http://vocab.override.org/"
10+
},
11+
"@id": "ex:inner",
12+
"prop1": "baz1",
13+
"prop2": "baz2"
14+
}
15+
}

tests/toRdf/c035-out.nq

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<ex:inner> <http://vocab.org/prop1> "baz1" .
2+
<ex:inner> <http://vocab.override.org/prop2> "baz2" .
3+
<ex:outer> <http://vocab.org/foo> <ex:inner> .

0 commit comments

Comments
 (0)