Skip to content

Commit d292b6a

Browse files
committed
Add expansion test where scoped context is a URL.
1 parent 680cee3 commit d292b6a

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

tests/expand-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,14 @@
11881188
"input": "expand/c033-in.jsonld",
11891189
"expectErrorCode": "invalid scoped context",
11901190
"option": {"specVersion": "json-ld-1.1"}
1191+
}, {
1192+
"@id": "#tc034",
1193+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1194+
"name": "Remote scoped context.",
1195+
"purpose": "Scoped contexts may be externally loaded.",
1196+
"input": "expand/c034-in.jsonld",
1197+
"expect": "expand/c034-out.jsonld",
1198+
"option": {"specVersion": "json-ld-1.1"}
11911199
}, {
11921200
"@id": "#tdi01",
11931201
"@type": [ "jld:PositiveEvaluationTest", "jld:ExpandTest" ],

tests/expand/c034-context.jsonld

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

tests/expand/c034-in.jsonld

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"@context": {
3+
"@vocab": "http://example/",
4+
"foo": {"@context": "c034-context.jsonld"}
5+
},
6+
"foo": {
7+
"bar": "baz"
8+
}
9+
}

tests/expand/c034-out.jsonld

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
{
3+
"http://example/foo": [{"http://example.org/bar": [{"@value": "baz"}]}]
4+
}
5+
]

0 commit comments

Comments
 (0)