Skip to content

Commit 3011088

Browse files
committed
Simple property generator compaction test
This addresses #142 and #160.
1 parent 18f2ea1 commit 3011088

File tree

4 files changed

+51
-0
lines changed

4 files changed

+51
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
"field_related": {
9+
"@id": [ "site:vocab/field_related", "http://schema.org/about" ]
10+
}
11+
}
12+
}
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: 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+
"field_related": {
9+
"@id": [ "site:vocab/field_related", "http://schema.org/about" ]
10+
}
11+
},
12+
"@id": "site:node/1",
13+
"field_tags": [
14+
{ "@id": "site:term/this-is-a-tag" }
15+
],
16+
"field_related": {
17+
"@id": "site:node/this-is-related-news"
18+
}
19+
}

test-suite/tests/compact-manifest.jsonld

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,5 +186,11 @@
186186
"input": "compact-0030-in.jsonld",
187187
"context": "compact-0030-context.jsonld",
188188
"expect": "compact-0030-out.jsonld"
189+
}, {
190+
"@type": ["test:TestCase", "jld:CompactTest"],
191+
"name": "Compacting property generators (no type coercions, language mappings etc.)",
192+
"input": "compact-0031-in.jsonld",
193+
"context": "compact-0031-context.jsonld",
194+
"expect": "compact-0031-out.jsonld"
189195
}]
190196
}

0 commit comments

Comments
 (0)