Skip to content

Commit 6f71e27

Browse files
committed
Add tests for context version alternates [1.0, 1.1, 1.0], [1.1, 1.0], [1.1, 1.0, 1.1].
1 parent 9903b7d commit 6f71e27

File tree

7 files changed

+62
-0
lines changed

7 files changed

+62
-0
lines changed

test-suite/tests/expand-manifest.jsonld

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,30 @@
10821082
"option": {"specVersion": "json-ld-1.1"},
10831083
"input": "expand-p001-in.jsonld",
10841084
"expect": "expand-p001-out.jsonld"
1085+
}, {
1086+
"@id": "#tp002",
1087+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1088+
"name": "@version setting [1.0, 1.1, 1.0]",
1089+
"purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
1090+
"option": {"specVersion": "json-ld-1.1"},
1091+
"input": "expand-p002-in.jsonld",
1092+
"expect": "expand-p002-out.jsonld"
1093+
}, {
1094+
"@id": "#tp003",
1095+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1096+
"name": "@version setting [1.1, 1.0]",
1097+
"purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
1098+
"option": {"specVersion": "json-ld-1.1"},
1099+
"input": "expand-p003-in.jsonld",
1100+
"expect": "expand-p003-out.jsonld"
1101+
}, {
1102+
"@id": "#tp004",
1103+
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
1104+
"name": "@version setting [1.1, 1.0, 1.1]",
1105+
"purpose": "If processing mode is not set through API, it is set by the first context containing @version.",
1106+
"option": {"specVersion": "json-ld-1.1"},
1107+
"input": "expand-p004-in.jsonld",
1108+
"expect": "expand-p004-out.jsonld"
10851109
}, {
10861110
"@id": "#tl001",
10871111
"@type": ["jld:PositiveEvaluationTest", "jld:ExpandTest"],
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"@context": [
3+
{"@vocab": "http://example/"},
4+
{"@version": 1.1, "a": {"@type": "@id"}},
5+
{"b": {"@type": "@id"}}
6+
],
7+
"a": "http://example.org/foo",
8+
"b": "http://example.org/bar"
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[{
2+
"http://example/a": [{"@id": "http://example.org/foo"}],
3+
"http://example/b": [{"@id": "http://example.org/bar"}]
4+
}]
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"@context": [
3+
{"@version": 1.1, "a": {"@id": "http://example/a", "@type": "@id"}},
4+
{"@vocab": "http://example/", "b": {"@type": "@id"}}
5+
],
6+
"a": "http://example.org/foo",
7+
"b": "http://example.org/bar"
8+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[{
2+
"http://example/a": [{"@id": "http://example.org/foo"}],
3+
"http://example/b": [{"@id": "http://example.org/bar"}]
4+
}]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"@context": [
3+
{"@version": 1.1, "a": {"@id": "http://example/a", "@type": "@id"}},
4+
{"@vocab": "http://example/"},
5+
{"@version": 1.1, "b": {"@type": "@id"}}
6+
],
7+
"a": "http://example.org/foo",
8+
"b": "http://example.org/bar"
9+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[{
2+
"http://example/a": [{"@id": "http://example.org/foo"}],
3+
"http://example/b": [{"@id": "http://example.org/bar"}]
4+
}]

0 commit comments

Comments
 (0)