diff --git a/tests/expand-manifest.html b/tests/expand-manifest.html index 145e21c4..3d8c0d28 100644 --- a/tests/expand-manifest.html +++ b/tests/expand-manifest.html @@ -9671,6 +9671,34 @@

+
+ Test tpr44 Property-scoped context on @nest applies before nested type-scoped context. +
+
+
+
id
+
#tpr44
+
Type
+
jld:PositiveEvaluationTest, jld:ExpandTest
+
Purpose
+
A property-scoped context on an @nest term applies before expanding @type and type-scoped terms in the nested node.
+
input
+
+ expand/pr44-in.jsonld +
+
expect
+
+ expand/pr44-out.jsonld +
+
Options
+
+
+
specVersion
+
json-ld-1.1
+
+
+
+
Test tso01 @import is invalid in 1.0.
diff --git a/tests/expand-manifest.jsonld b/tests/expand-manifest.jsonld index 1fbd5efa..5552ca0c 100644 --- a/tests/expand-manifest.jsonld +++ b/tests/expand-manifest.jsonld @@ -2867,6 +2867,14 @@ "option": {"specVersion": "json-ld-1.1"}, "input": "expand/pr43-in.jsonld", "expect": "expand/pr43-out.jsonld" + }, { + "@id": "#tpr44", + "@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"], + "name": "Property-scoped context on @nest applies before nested type-scoped context.", + "purpose": "A property-scoped context on an @nest term applies before expanding @type and type-scoped terms in the nested node.", + "option": {"specVersion": "json-ld-1.1"}, + "input": "expand/pr44-in.jsonld", + "expect": "expand/pr44-out.jsonld" }, { "@id": "#tso01", "@type": ["jld:NegativeEvaluationTest", "jld:ExpandTest"], diff --git a/tests/expand/pr44-in.jsonld b/tests/expand/pr44-in.jsonld new file mode 100644 index 00000000..c31be504 --- /dev/null +++ b/tests/expand/pr44-in.jsonld @@ -0,0 +1,20 @@ +{ + "@context": { + "@vocab": "http://example.org/outer#", + "p1": { + "@id": "@nest", + "@context": { + "Type": { + "@id": "http://example.org/ns#Type", + "@context": { + "p2": "http://example.org/ns#P2" + } + } + } + } + }, + "p1": { + "@type": "Type", + "p2": "foo" + } +} diff --git a/tests/expand/pr44-out.jsonld b/tests/expand/pr44-out.jsonld new file mode 100644 index 00000000..ed2361e3 --- /dev/null +++ b/tests/expand/pr44-out.jsonld @@ -0,0 +1,12 @@ +[ + { + "@type": [ + "http://example.org/ns#Type" + ], + "http://example.org/ns#P2": [ + { + "@value": "foo" + } + ] + } +]