From a4346da393d329e4ecafce1efed5570bf9e1f578 Mon Sep 17 00:00:00 2001 From: Anatoly Scherbakov Date: Mon, 18 May 2026 17:30:56 +0300 Subject: [PATCH 1/2] Add nested scoped context expansion test --- tests/expand-manifest.jsonld | 8 ++++++++ tests/expand/pr44-in.jsonld | 20 ++++++++++++++++++++ tests/expand/pr44-out.jsonld | 12 ++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 tests/expand/pr44-in.jsonld create mode 100644 tests/expand/pr44-out.jsonld 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" + } + ] + } +] From 66422b9254c17524601b9cef8a84f1d209de5fb1 Mon Sep 17 00:00:00 2001 From: anatoly-scherbakov Date: Mon, 18 May 2026 14:34:46 +0000 Subject: [PATCH 2/2] Automated report generation --- tests/expand-manifest.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) 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.