Skip to content

Commit e36c8d2

Browse files
rubensworksgkellogg
authored andcommitted
Add corresponding expansion test for c035
1 parent 59bc33e commit e36c8d2

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

tests/expand-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,6 +1236,14 @@
12361236
"input": "expand/c034-in.jsonld",
12371237
"expect": "expand/c034-out.jsonld",
12381238
"option": {"specVersion": "json-ld-1.1"}
1239+
}, {
1240+
"@id": "#tc035",
1241+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1242+
"name": "Term scoping with embedded contexts.",
1243+
"purpose": "Terms should make use of @vocab relative to the scope in which the term was defined.",
1244+
"input": "expand/c035-in.jsonld",
1245+
"expect": "expand/c035-out.nq",
1246+
"option": {"specVersion": "json-ld-1.1"}
12391247
}, {
12401248
"@id": "#tdi01",
12411249
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],

tests/expand/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/expand/c035-out.jsonld

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

0 commit comments

Comments
 (0)