Skip to content

Commit d650bf4

Browse files
pchampingkellogg
authored andcommitted
add test for keyword-alias declared as prefix
1 parent 5e2043e commit d650bf4

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

tests/expand-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2368,6 +2368,14 @@
23682368
"option": {"specVersion": "json-ld-1.1"},
23692369
"input": "expand/pr29-in.jsonld",
23702370
"expect": "expand/pr29-out.jsonld"
2371+
}, {
2372+
"@id": "#tpr30",
2373+
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],
2374+
"name": "Fails if trying to declare a keyword alias as prefix.",
2375+
"purpose": "Keyword aliases can not be used as prefixes.",
2376+
"option": {"specVersion": "json-ld-1.1"},
2377+
"input": "expand/pr30-in.jsonld",
2378+
"expect": "invalid term definition"
23712379
}, {
23722380
"@id": "#tso01",
23732381
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],

tests/expand/pr30-in.jsonld

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"foo": {
5+
"@id": "@type",
6+
"@prefix": true
7+
}
8+
},
9+
"foo:bar": "http://example.org/baz"
10+
}

0 commit comments

Comments
 (0)