Skip to content

Commit e490c95

Browse files
committed
Test that the shortest property generator term is chosen
This addresses #142 and #160.
1 parent e0fb8a4 commit e490c95

File tree

4 files changed

+65
-0
lines changed

4 files changed

+65
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"@context": {
3+
"site": "http://example.com/",
4+
"field_tags": {
5+
"@id": [ "site:vocab/field_tags", "http://schema.org/about" ],
6+
"@container": "@set"
7+
},
8+
"z_tags": {
9+
"@id": [ "site:vocab/field_tags", "http://schema.org/about" ],
10+
"@container": "@set"
11+
},
12+
"z_related": {
13+
"@id": [ "site:vocab/field_related", "http://schema.org/about" ]
14+
},
15+
"field_related": {
16+
"@id": [ "site:vocab/field_related", "http://schema.org/about" ]
17+
}
18+
}
19+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[{
2+
"@id": "http://example.com/node/1",
3+
"http://example.com/vocab/field_related": [{
4+
"@id": "http://example.com/node/this-is-related-news"
5+
}],
6+
"http://schema.org/about": [{
7+
"@id": "http://example.com/node/this-is-related-news"
8+
}, {
9+
"@id": "http://example.com/term/this-is-a-tag"
10+
}],
11+
"http://example.com/vocab/field_tags": [{
12+
"@id": "http://example.com/term/this-is-a-tag"
13+
}]
14+
}]
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"@context": {
3+
"site": "http://example.com/",
4+
"field_tags": {
5+
"@id": [ "site:vocab/field_tags", "http://schema.org/about" ],
6+
"@container": "@set"
7+
},
8+
"z_tags": {
9+
"@id": [ "site:vocab/field_tags", "http://schema.org/about" ],
10+
"@container": "@set"
11+
},
12+
"z_related": {
13+
"@id": [ "site:vocab/field_related", "http://schema.org/about" ]
14+
},
15+
"field_related": {
16+
"@id": [ "site:vocab/field_related", "http://schema.org/about" ]
17+
}
18+
},
19+
"@id": "site:node/1",
20+
"z_tags": [
21+
{ "@id": "site:term/this-is-a-tag" }
22+
],
23+
"z_related": {
24+
"@id": "site:node/this-is-related-news"
25+
}
26+
}

test-suite/tests/compact-manifest.jsonld

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,5 +198,11 @@
198198
"input": "compact-0032-in.jsonld",
199199
"context": "compact-0032-context.jsonld",
200200
"expect": "compact-0032-out.jsonld"
201+
}, {
202+
"@type": ["test:TestCase", "jld:CompactTest"],
203+
"name": "Use shortest property generator term",
204+
"input": "compact-0033-in.jsonld",
205+
"context": "compact-0033-context.jsonld",
206+
"expect": "compact-0033-out.jsonld"
201207
}]
202208
}

0 commit comments

Comments
 (0)