Added toRdf test using produceGeneralizedRDF option (based on toRdf-0078.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Sat, 31 Aug 2013 15:26:05 -0700
changeset 1952 8e830a278a54
parent 1951 e56627853bef
child 1953 61d8b02625bb
Added toRdf test using produceGeneralizedRDF option (based on toRdf-0078.
test-suite/tests/toRdf-0118-in.jsonld
test-suite/tests/toRdf-0118-out.nq
test-suite/tests/toRdf-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/toRdf-0118-in.jsonld	Sat Aug 31 15:26:05 2013 -0700
@@ -0,0 +1,38 @@
+{
+  "@context": {
+    "term": "_:term",
+    "termId": { "@id": "term", "@type": "@id" }
+  },
+  "@id": "_:term",
+  "@type": "_:term",
+  "term": [
+    {
+      "@id": "_:term",
+      "@type": "term"
+    },
+    {
+      "@id": "_:Bx",
+      "term": "term"
+    },
+    "plain value",
+    {
+      "@id": "_:term"
+    }
+  ],
+  "termId": [
+    {
+      "@id": "_:term",
+      "@type": "term"
+    },
+    {
+      "@id": "_:Cx",
+      "term": "termId"
+    },
+    "term:AppendedToBlankNode",
+    "_:termAppendedToBlankNode",
+    "relativeIri",
+    {
+      "@id": "_:term"
+    }
+  ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/toRdf-0118-out.nq	Sat Aug 31 15:26:05 2013 -0700
@@ -0,0 +1,9 @@
+_:b0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:b0 .
+_:b0 _:b0 "plain value" .
+_:b0 _:b0 <http://json-ld.org/test-suite/tests/relativeIri> .
+_:b0 _:b0 _:b0 .
+_:b0 _:b0 _:b1 .
+_:b0 _:b0 _:b2 .
+_:b0 _:b0 _:b3 .
+_:b1 _:b0 "term" .
+_:b2 _:b0 "termId" .
--- a/test-suite/tests/toRdf-manifest.jsonld	Sat Aug 31 14:12:41 2013 -0700
+++ b/test-suite/tests/toRdf-manifest.jsonld	Sat Aug 31 15:26:05 2013 -0700
@@ -790,6 +790,16 @@
       "purpose": "Embedding @graph in a node creates a named graph. Graph name is created if there is no subject",
       "input": "toRdf-0117-in.jsonld",
       "expect": "toRdf-0117-out.nq"
+    }, {
+      "@id": "#t0118",
+      "@type": ["jld:PositiveEvaluationTest", "jld:ToRDFTest"],
+      "name": "produce generalized RDF flag",
+      "purpose": "Triples with blank node predicates are not dropped by if the produce generalized RDF flag is true.",
+      "option": {
+        "produceGeneralizedRDF": true
+      },
+      "input": "toRdf-0118-in.jsonld",
+      "expect": "toRdf-0118-out.nq"
     }
   ]
 }