Skip to content

Commit aa27ae1

Browse files
davidlehngkellogg
authored andcommitted
Add JSON literal alias tests.
1 parent d3eff01 commit aa27ae1

File tree

5 files changed

+56
-0
lines changed

5 files changed

+56
-0
lines changed

tests/expand-manifest.jsonld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,6 +1856,22 @@
18561856
"input": "expand/js12-in.jsonld",
18571857
"expect": "expand/js12-out.jsonld",
18581858
"option": {"specVersion": "json-ld-1.1"}
1859+
}, {
1860+
"@id": "#tjs13",
1861+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1862+
"name": "Expand JSON literal with aliased @type",
1863+
"purpose": "Tests expanding JSON literal with aliased @type.",
1864+
"input": "expand/js13-in.jsonld",
1865+
"expect": "expand/js13-out.jsonld",
1866+
"option": {"specVersion": "json-ld-1.1"}
1867+
}, {
1868+
"@id": "#tjs14",
1869+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1870+
"name": "Expand JSON literal with aliased @value",
1871+
"purpose": "Tests expanding JSON literal with aliased @value.",
1872+
"input": "expand/js14-in.jsonld",
1873+
"expect": "expand/js14-out.jsonld",
1874+
"option": {"specVersion": "json-ld-1.1"}
18591875
}, {
18601876
"@id": "#tl001",
18611877
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],

tests/expand/js13-in.jsonld

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"type": "@type"
5+
},
6+
"ex:foo": {
7+
"type": "@json",
8+
"@value": {
9+
"test": 1
10+
}
11+
}
12+
}

tests/expand/js13-out.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[{
2+
"ex:foo": [{
3+
"@type": "@json",
4+
"@value": {
5+
"test": 1
6+
}
7+
}]
8+
}]

tests/expand/js14-in.jsonld

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"@context": {
3+
"@version": 1.1,
4+
"value": "@value"
5+
},
6+
"ex:foo": {
7+
"@type": "@json",
8+
"value": {
9+
"test": 1
10+
}
11+
}
12+
}

tests/expand/js14-out.jsonld

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[{
2+
"ex:foo": [{
3+
"@type": "@json",
4+
"@value": {
5+
"test": 1
6+
}
7+
}]
8+
}]

0 commit comments

Comments
 (0)