diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index c18f12bb..636ad35e 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:NegativeEvaluationTest", "jld:ExpandTest"], + "name": "Fail if protected flag not retained during redefinition", + "purpose": "Check protected redefinition retains protected flag.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand/pr42-in.jsonld", + "expectErrorCode": "protected term redefinition" }, { "@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..3dd79f95 --- /dev/null +++ b/tests/expand/pr42-in.jsonld @@ -0,0 +1,15 @@ +{ + "@context": [ + { + "@protected": true, + "protected": "ex:protected" + }, + { + "protected": "ex:protected" + }, + { + "protected": "ex:unprotected" + } + ], + "protected": "fail / protection not retained during redefinition" +} diff --git a/tests/toRdf-manifest.jsonld b/tests/toRdf-manifest.jsonld index b5448d5f..3b25e3a0 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:NegativeEvaluationTest", "jld:ToRDFTest"], + "name": "Fail if protected flag not retained during redefinition", + "purpose": "Check protected redefinition retains protected flag.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "toRdf/pr42-in.jsonld", + "expectErrorCode": "protected term redefinition" }, { "@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..3dd79f95 --- /dev/null +++ b/tests/toRdf/pr42-in.jsonld @@ -0,0 +1,15 @@ +{ + "@context": [ + { + "@protected": true, + "protected": "ex:protected" + }, + { + "protected": "ex:protected" + }, + { + "protected": "ex:unprotected" + } + ], + "protected": "fail / protection not retained during redefinition" +}