Added fromRdf-0020 to test for lists having nodes shared across different graphs.
This addresses issue #357.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0020-in.nq Sun Jul 27 14:36:01 2014 -0700
@@ -0,0 +1,6 @@
+<http://www.example.com/z> <http://www.example.com/q> _:z0 <http://www.example.com/G> .
+_:z0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "cell-A" <http://www.example.com/G> .
+_:z0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> _:z1 <http://www.example.com/G> .
+_:z1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#first> "cell-B" <http://www.example.com/G> .
+_:z1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest> <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil> <http://www.example.com/G> .
+<http://www.example.com/x> <http://www.example.com/p> _:z1 <http://www.example.com/G1> .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/fromRdf-0020-out.jsonld Sun Jul 27 14:36:01 2014 -0700
@@ -0,0 +1,22 @@
+[{
+ "@id": "http://www.example.com/G",
+ "@graph": [{
+ "@id": "_:z0",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [{"@value": "cell-A"}],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [{"@id": "_:z1"}]
+ }, {
+ "@id": "_:z1",
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#first": [{"@value": "cell-B"}],
+ "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest": [{"@list": []}]
+ }, {
+ "@id": "http://www.example.com/z",
+ "http://www.example.com/q": [{"@id": "_:z0"}]
+ }]
+},
+{
+ "@id": "http://www.example.com/G1",
+ "@graph": [{
+ "@id": "http://www.example.com/x",
+ "http://www.example.com/p": [{"@id": "_:z1"}]
+ }]
+}]
\ No newline at end of file
--- a/test-suite/tests/fromRdf-manifest.jsonld Sun Jul 27 12:59:15 2014 -0700
+++ b/test-suite/tests/fromRdf-manifest.jsonld Sun Jul 27 14:36:01 2014 -0700
@@ -145,6 +145,13 @@
},
"input": "fromRdf-0019-in.nq",
"expect": "fromRdf-0019-out.jsonld"
+ }, {
+ "@id": "#t0020",
+ "@type": ["jld:PositiveEvaluationTest", "jld:FromRDFTest"],
+ "name": "list with node shared across graphs",
+ "purpose": "An otherwise conformant list with a node shared across different lists does not serialize using @list",
+ "input": "fromRdf-0020-in.nq",
+ "expect": "fromRdf-0020-out.jsonld"
}
]
}