diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index c18f12bb..719edbe4 100644 --- a/tests/expand-manifest.jsonld +++ b/tests/expand-manifest.jsonld @@ -2843,6 +2843,14 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr41-in.jsonld", "expect": "expand/pr41-out.jsonld" + }, { + "@id": "#tpr42", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Clear protection in @graph @container with null context.", + "purpose": "Clear protection in @graph @container with null context.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand/pr42-in.jsonld", + "expect": "expand/pr42-out.jsonld" }, { "@id": "#tso01", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], diff --git a/tests/expand/pr42-in.jsonld b/tests/expand/pr42-in.jsonld new file mode 100644 index 00000000..aafbb4d7 --- /dev/null +++ b/tests/expand/pr42-in.jsonld @@ -0,0 +1,23 @@ +{ + "@context": { + "@protected": true, + "protected": { + "@id": "ex:protected1", + "@type": "@id" + }, + "unprotected": { + "@id": "ex:unprotected", + "@type": "@id", + "@container": "@graph", + "@context": null + } + }, + "@id": "ex:outer", + "unprotected": { + "@context": { + "protected": "ex:protected2" + }, + "@id": "ex:inner", + "protected": "p === ex:protected2" + } +} diff --git a/tests/expand/pr42-out.jsonld b/tests/expand/pr42-out.jsonld new file mode 100644 index 00000000..a11925d4 --- /dev/null +++ b/tests/expand/pr42-out.jsonld @@ -0,0 +1,19 @@ +[ + { + "@id": "ex:outer", + "ex:unprotected": [ + { + "@graph": [ + { + "@id": "ex:inner", + "ex:protected2": [ + { + "@value": "p === ex:protected2" + } + ] + } + ] + } + ] + } +] diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld index b5448d5f..41a0e8dc 100644 --- a/tests/toRdf-manifest.jsonld +++ b/tests/toRdf-manifest.jsonld @@ -3372,6 +3372,14 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "toRdf/pr41-in.jsonld", "expect": "toRdf/pr41-out.nq" + }, { + "@id": "#tpr42", + "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], + "name": "Clear protection in @graph @container with null context.", + "purpose": "Clear protection in @graph @container with null context.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "toRdf/pr42-in.jsonld", + "expect": "toRdf/pr42-out.nq" }, { "@id": "#trt01", "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"], diff --git a/tests/toRdf/pr42-in.jsonld b/tests/toRdf/pr42-in.jsonld new file mode 100644 index 00000000..aafbb4d7 --- /dev/null +++ b/tests/toRdf/pr42-in.jsonld @@ -0,0 +1,23 @@ +{ + "@context": { + "@protected": true, + "protected": { + "@id": "ex:protected1", + "@type": "@id" + }, + "unprotected": { + "@id": "ex:unprotected", + "@type": "@id", + "@container": "@graph", + "@context": null + } + }, + "@id": "ex:outer", + "unprotected": { + "@context": { + "protected": "ex:protected2" + }, + "@id": "ex:inner", + "protected": "p === ex:protected2" + } +} diff --git a/tests/toRdf/pr42-out.nq b/tests/toRdf/pr42-out.nq new file mode 100644 index 00000000..d4788bca --- /dev/null +++ b/tests/toRdf/pr42-out.nq @@ -0,0 +1,2 @@ + _:b0 . + "p === ex:protected2" _:b0 .