Skip to content

Commit 626350a

Browse files
committed
Add graph container null context protection test.
1 parent f18efc9 commit 626350a

File tree

6 files changed

+83
-0
lines changed

6 files changed

+83
-0
lines changed

Diff for: tests/expand-manifest.jsonld

+8
Original file line numberDiff line numberDiff line change
@@ -2843,6 +2843,14 @@
28432843
"option": {"specVersion": "json-ld-1.1"},
28442844
"input": "expand/pr41-in.jsonld",
28452845
"expect": "expand/pr41-out.jsonld"
2846+
}, {
2847+
"@id": "#tpr42",
2848+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
2849+
"name": "Clear protection in @graph @container with null context.",
2850+
"purpose": "Clear protection in @graph @container with null context.",
2851+
"option": {"specVersion": "json-ld-1.1"},
2852+
"input": "expand/pr42-in.jsonld",
2853+
"expect": "expand/pr42-out.jsonld"
28462854
}, {
28472855
"@id": "#tso01",
28482856
"@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"],

Diff for: tests/expand/pr42-in.jsonld

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": {
3+
"@protected": true,
4+
"protected": {
5+
"@id": "ex:protected1",
6+
"@type": "@id"
7+
},
8+
"unprotected": {
9+
"@id": "ex:unprotected",
10+
"@type": "@id",
11+
"@container": "@graph",
12+
"@context": null
13+
}
14+
},
15+
"@id": "ex:outer",
16+
"unprotected": {
17+
"@context": {
18+
"protected": "ex:protected2"
19+
},
20+
"@id": "ex:inner",
21+
"protected": "p === ex:protected2"
22+
}
23+
}

Diff for: tests/expand/pr42-out.jsonld

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[
2+
{
3+
"@id": "ex:outer",
4+
"ex:unprotected": [
5+
{
6+
"@graph": [
7+
{
8+
"@id": "ex:inner",
9+
"ex:protected2": [
10+
{
11+
"@value": "p === ex:protected2"
12+
}
13+
]
14+
}
15+
]
16+
}
17+
]
18+
}
19+
]

Diff for: tests/toRdf-manifest.jsonld

+8
Original file line numberDiff line numberDiff line change
@@ -3372,6 +3372,14 @@
33723372
"option": {"specVersion": "json-ld-1.1"},
33733373
"input": "toRdf/pr41-in.jsonld",
33743374
"expect": "toRdf/pr41-out.nq"
3375+
}, {
3376+
"@id": "#tpr42",
3377+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
3378+
"name": "Clear protection in @graph @container with null context.",
3379+
"purpose": "Clear protection in @graph @container with null context.",
3380+
"option": {"specVersion": "json-ld-1.1"},
3381+
"input": "toRdf/pr42-in.jsonld",
3382+
"expect": "toRdf/pr42-out.nq"
33753383
}, {
33763384
"@id": "#trt01",
33773385
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],

Diff for: tests/toRdf/pr42-in.jsonld

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": {
3+
"@protected": true,
4+
"protected": {
5+
"@id": "ex:protected1",
6+
"@type": "@id"
7+
},
8+
"unprotected": {
9+
"@id": "ex:unprotected",
10+
"@type": "@id",
11+
"@container": "@graph",
12+
"@context": null
13+
}
14+
},
15+
"@id": "ex:outer",
16+
"unprotected": {
17+
"@context": {
18+
"protected": "ex:protected2"
19+
},
20+
"@id": "ex:inner",
21+
"protected": "p === ex:protected2"
22+
}
23+
}

Diff for: tests/toRdf/pr42-out.nq

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<ex:outer> <ex:unprotected> _:b0 .
2+
<ex:inner> <ex:protected2> "p === ex:protected2" _:b0 .

0 commit comments

Comments
 (0)