Skip to content

Commit e468110

Browse files
committed
Add expand/li03-10 to toRdf.
1 parent a74c68b commit e468110

17 files changed

+140
-0
lines changed

tests/toRdf-manifest.jsonld

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,6 +2327,70 @@
23272327
"input": "toRdf/li02-in.jsonld",
23282328
"expect": "toRdf/li02-out.nq",
23292329
"option": {"specVersion": "json-ld-1.1"}
2330+
}, {
2331+
"@id": "#tli03",
2332+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2333+
"name": "@list containing @list (with coercion)",
2334+
"purpose": "List of lists",
2335+
"option": {"specVersion": "json-ld-1.1"},
2336+
"input": "toRdf/li03-in.jsonld",
2337+
"expect": "toRdf/li03-out.nq"
2338+
}, {
2339+
"@id": "#tli04",
2340+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2341+
"name": "@list containing empty @list (with coercion)",
2342+
"purpose": "List of lists",
2343+
"option": {"specVersion": "json-ld-1.1"},
2344+
"input": "toRdf/li04-in.jsonld",
2345+
"expect": "toRdf/li04-out.nq"
2346+
}, {
2347+
"@id": "#tli05",
2348+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2349+
"name": "coerced @list containing an array",
2350+
"purpose": "List of lists",
2351+
"option": {"specVersion": "json-ld-1.1"},
2352+
"input": "toRdf/li05-in.jsonld",
2353+
"expect": "toRdf/li05-out.nq"
2354+
}, {
2355+
"@id": "#tli06",
2356+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2357+
"name": "coerced @list containing an empty array",
2358+
"purpose": "List of lists",
2359+
"option": {"specVersion": "json-ld-1.1"},
2360+
"input": "toRdf/li06-in.jsonld",
2361+
"expect": "toRdf/li06-out.nq"
2362+
}, {
2363+
"@id": "#tli07",
2364+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2365+
"name": "coerced @list containing deep arrays",
2366+
"purpose": "List of lists",
2367+
"option": {"specVersion": "json-ld-1.1"},
2368+
"input": "toRdf/li07-in.jsonld",
2369+
"expect": "toRdf/li07-out.nq"
2370+
}, {
2371+
"@id": "#tli08",
2372+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2373+
"name": "coerced @list containing deep empty arrays",
2374+
"purpose": "List of lists",
2375+
"option": {"specVersion": "json-ld-1.1"},
2376+
"input": "toRdf/li08-in.jsonld",
2377+
"expect": "toRdf/li08-out.nq"
2378+
}, {
2379+
"@id": "#tli09",
2380+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2381+
"name": "coerced @list containing multiple lists",
2382+
"purpose": "List of lists",
2383+
"option": {"specVersion": "json-ld-1.1"},
2384+
"input": "toRdf/li09-in.jsonld",
2385+
"expect": "toRdf/li09-out.nq"
2386+
}, {
2387+
"@id": "#tli10",
2388+
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
2389+
"name": "coerced @list containing mixed list values",
2390+
"purpose": "List of lists",
2391+
"option": {"specVersion": "json-ld-1.1"},
2392+
"input": "toRdf/li10-in.jsonld",
2393+
"expect": "toRdf/li10-out.nq"
23302394
}, {
23312395
"@id": "#tm001",
23322396
"@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],

tests/toRdf/li03-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [{"@list": ["baz"]}]
4+
}

tests/toRdf/li03-out.nq

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
4+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "baz" .
5+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li04-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [{"@list": []}]
4+
}

tests/toRdf/li04-out.nq

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li05-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [["baz"]]
4+
}

tests/toRdf/li05-out.nq

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
4+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "baz" .
5+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li06-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [[]]
4+
}

tests/toRdf/li06-out.nq

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li07-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [[["baz"]]]
4+
}

tests/toRdf/li07-out.nq

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
4+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b3 .
5+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
6+
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "baz" .
7+
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li08-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [[[]]]
4+
}

tests/toRdf/li08-out.nq

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
4+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
5+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li09-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [["a"], ["b"]]
4+
}

tests/toRdf/li09-out.nq

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b3 .
4+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
5+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
6+
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b4 .
7+
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
8+
_:b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
9+
_:b4 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

tests/toRdf/li10-in.jsonld

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"@context": {"foo": {"@id": "http://example.com/foo", "@container": "@list"}},
3+
"foo": [["a"], "b"]
4+
}

tests/toRdf/li10-out.nq

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
_:b0 <http://example.com/foo> _:b1 .
2+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> _:b2 .
3+
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:b3 .
4+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "a" .
5+
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .
6+
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "b" .
7+
_:b3 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> .

0 commit comments

Comments
 (0)