Skip to content

Commit 1cb8dfe

Browse files
davidlehngkellogg
authored andcommitted
Add similar id protected term redefinition test.
- Add test of redefining equivalent id terms in different forms: - `"foo": {"@id": "ex:foo"}` - `"foo": "ex:foo"`
1 parent 6134852 commit 1cb8dfe

File tree

6 files changed

+55
-0
lines changed

6 files changed

+55
-0
lines changed

tests/expand-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2827,6 +2827,14 @@
28272827
"option": {"specVersion": "json-ld-1.1"},
28282828
"input": "expand/pr40-in.jsonld",
28292829
"expect": "expand/pr40-out.jsonld"
2830+
}, {
2831+
"@id": "#tpr41",
2832+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
2833+
"name": "Allows protected redefinition of equivalent id terms",
2834+
"purpose": "Check protected redefinition of equivalent id terms in different forms.",
2835+
"option": {"specVersion": "json-ld-1.1"},
2836+
"input": "expand/pr41-in.jsonld",
2837+
"expect": "expand/pr41-out.jsonld"
28302838
}, {
28312839
"@id": "#tso01",
28322840
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],

tests/expand/pr41-in.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"@context": {
3+
"@protected": true,
4+
"foo": {
5+
"@id": "ex:foo"
6+
}
7+
},
8+
"@id": "ex:outer",
9+
"foo": {
10+
"@context": {
11+
"@protected": true,
12+
"foo": "ex:foo"
13+
},
14+
"@id": "ex:inner"
15+
}
16+
}

tests/expand/pr41-out.jsonld

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[{
2+
"@id": "ex:outer",
3+
"ex:foo": [{
4+
"@id": "ex:inner"
5+
}]
6+
}]

tests/toRdf-manifest.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3357,6 +3357,14 @@
33573357
"option": {"specVersion": "json-ld-1.1"},
33583358
"input": "toRdf/pr40-in.jsonld",
33593359
"expect": "toRdf/pr40-out.nq"
3360+
}, {
3361+
"@id": "#tpr41",
3362+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
3363+
"name": "Allows protected redefinition of equivalent id terms",
3364+
"purpose": "Check protected redefinition of equivalent id terms in different forms.",
3365+
"option": {"specVersion": "json-ld-1.1"},
3366+
"input": "toRdf/pr41-in.jsonld",
3367+
"expect": "toRdf/pr41-out.nq"
33603368
}, {
33613369
"@id": "#trt01",
33623370
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],

tests/toRdf/pr41-in.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"@context": {
3+
"@protected": true,
4+
"foo": {
5+
"@id": "ex:foo"
6+
}
7+
},
8+
"@id": "ex:outer",
9+
"foo": {
10+
"@context": {
11+
"@protected": true,
12+
"foo": "ex:foo"
13+
},
14+
"@id": "ex:inner"
15+
}
16+
}

tests/toRdf/pr41-out.nq

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ex:outer> <ex:foo> <ex:inner> .

0 commit comments

Comments
 (0)