Add @type: @vocab expansion test
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 13 Feb 2013 11:35:05 +0100
changeset 1240 817e45174310
parent 1239 a7b0ce70688a
child 1241 f1f42e1604bb
Add @type: @vocab expansion test
test-suite/tests/expand-0053-in.jsonld
test-suite/tests/expand-0053-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0053-in.jsonld	Wed Feb 13 11:35:05 2013 +0100
@@ -0,0 +1,13 @@
+{
+  "@context": {
+    "name": "http://xmlns.com/foaf/0.1/name",
+    "homepage": { "@id": "http://xmlns.com/foaf/0.1/homepage", "@type": "@vocab" },
+    "link": { "@id": "http://example.com/link", "@type": "@id" },
+    "MarkusHomepage": "http://www.markus-lanthaler.com/",
+    "relative-iri": "http://example.com/error-if-this-is-used-for-link"
+  },
+  "@id": "http://me.markus-lanthaler.com/",
+  "name": "Markus Lanthaler",
+  "homepage": "MarkusHomepage",
+  "link": "relative-iri"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0053-out.jsonld	Wed Feb 13 11:35:05 2013 +0100
@@ -0,0 +1,8 @@
+[
+  {
+    "@id": "http://me.markus-lanthaler.com/",
+    "http://xmlns.com/foaf/0.1/homepage": [ { "@id": "http://www.markus-lanthaler.com/" } ],
+    "http://example.com/link": [ {  "@id": "http://json-ld.org/test-suite/tests/relative-iri" } ],
+    "http://xmlns.com/foaf/0.1/name": [ { "@value": "Markus Lanthaler" } ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Tue Feb 12 16:17:30 2013 -0500
+++ b/test-suite/tests/expand-manifest.jsonld	Wed Feb 13 11:35:05 2013 +0100
@@ -266,6 +266,11 @@
       "name": "@vocab-relative IRIs in term definitions",
       "input": "expand-0052-in.jsonld",
       "expect": "expand-0052-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "Use terms with @type: @vocab but not with @type: @id",
+      "input": "expand-0053-in.jsonld",
+      "expect": "expand-0053-out.jsonld"
     }
   ]
 }