Skip to content

Commit 772b818

Browse files
authored
Merge pull request #509 from dankawka/master
Add test for compact property with @type as @id and @container as @list
2 parents 1b5a022 + b1f3d42 commit 772b818

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"@context": {
3+
"name": {
4+
"@type": "@id",
5+
"@container": "@list",
6+
"@id": "https://schema.org/name"
7+
}
8+
}
9+
}
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"name": {
4+
"@type": "@id",
5+
"@container": "@list",
6+
"@id": "https://schema.org/name"
7+
}
8+
},
9+
"name": []
10+
}
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"@context": {
3+
"name": {
4+
"@type": "@id",
5+
"@container": "@list",
6+
"@id": "https://schema.org/name"
7+
}
8+
},
9+
"name": []
10+
}

test-suite/tests/compact-manifest.jsonld

+8
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,14 @@
593593
"input": "compact-0073-in.jsonld",
594594
"context": "compact-0073-context.jsonld",
595595
"expect": "compact-0073-out.jsonld"
596+
}, {
597+
"@id": "#t0074",
598+
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
599+
"name": "Container as a list with type of @id",
600+
"purpose": "Ensure that compaction works for empty list when proparty has container declared as @list and type as @id",
601+
"input": "compact-0074-in.jsonld",
602+
"context": "compact-0074-context.jsonld",
603+
"expect": "compact-0074-out.jsonld"
596604
}, {
597605
"@id": "#tc001",
598606
"@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],

0 commit comments

Comments
 (0)