Skip to content

Commit 2ff40d4

Browse files
committed
Add property generator round tripping test based on Drupal's content syndication use case
This addresses #142 and #160.
1 parent 28bbce9 commit 2ff40d4

File tree

4 files changed

+103
-0
lines changed

4 files changed

+103
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"@context": {
3+
"site": "http://example.com/",
4+
"site-syn": "site:site-schema/syndication/",
5+
"schema": "http://schema.org/",
6+
"title": {
7+
"@id": [ "site-syn:node/article/title", "schema:name" ],
8+
"@container": "@set"
9+
},
10+
"body_value": {
11+
"@id": [ "site-syn:node/article/body/value", "schema:articleBody" ],
12+
"@container": "@set"
13+
},
14+
"body_summary": {
15+
"@id": [ "site-syn:node/article/body/summary", "schema:description" ],
16+
"@container": "@set"
17+
},
18+
"field_tags": {
19+
"@id": [ "site-syn:node/article/field_tags", "schema:about" ],
20+
"@container": "@set"
21+
}
22+
}
23+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"@context": {
3+
"site": "http://example.com/",
4+
"site-syn": "site:site-schema/syndication/",
5+
"schema": "http://schema.org/",
6+
"title": {
7+
"@id": [ "site-syn:node/article/title", "schema:name" ],
8+
"@container": "@set"
9+
},
10+
"body_value": {
11+
"@id": [ "site-syn:node/article/body/value", "schema:articleBody" ],
12+
"@container": "@set"
13+
},
14+
"body_summary": {
15+
"@id": [ "site-syn:node/article/body/summary", "schema:description" ],
16+
"@container": "@set"
17+
},
18+
"field_tags": {
19+
"@id": [ "site-syn:node/article/field_tags", "schema:about" ],
20+
"@container": "@set"
21+
}
22+
},
23+
"title": [
24+
"This is the title in English"
25+
],
26+
"body_value": [
27+
"This is the body value in English."
28+
],
29+
"body_summary": [
30+
"This is the teaser for the body value."
31+
],
32+
"field_tags": [
33+
{
34+
"@id": "site:taxonomy/term/1"
35+
}
36+
]
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"@context": {
3+
"site": "http://example.com/",
4+
"site-syn": "site:site-schema/syndication/",
5+
"schema": "http://schema.org/",
6+
"title": {
7+
"@id": [ "site-syn:node/article/title", "schema:name" ],
8+
"@container": "@set"
9+
},
10+
"body_value": {
11+
"@id": [ "site-syn:node/article/body/value", "schema:articleBody" ],
12+
"@container": "@set"
13+
},
14+
"body_summary": {
15+
"@id": [ "site-syn:node/article/body/summary", "schema:description" ],
16+
"@container": "@set"
17+
},
18+
"field_tags": {
19+
"@id": [ "site-syn:node/article/field_tags", "schema:about" ],
20+
"@container": "@set"
21+
}
22+
},
23+
"title": [
24+
"This is the title in English"
25+
],
26+
"body_value": [
27+
"This is the body value in English."
28+
],
29+
"body_summary": [
30+
"This is the teaser for the body value."
31+
],
32+
"field_tags": [
33+
{
34+
"@id": "site:taxonomy/term/1"
35+
}
36+
]
37+
}

test-suite/tests/compact-manifest.jsonld

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,5 +222,11 @@
222222
"input": "compact-0036-in.jsonld",
223223
"context": "compact-0036-context.jsonld",
224224
"expect": "compact-0036-out.jsonld"
225+
}, {
226+
"@type": ["test:TestCase", "jld:CompactTest"],
227+
"name": "Property generator round-tripping (Drupal content syndication)",
228+
"input": "compact-0037-in.jsonld",
229+
"context": "compact-0037-context.jsonld",
230+
"expect": "compact-0037-out.jsonld"
225231
}]
226232
}

0 commit comments

Comments
 (0)