Test behaviour of setting a term's @id to null when @vocab is used
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 22 Oct 2012 18:09:25 +0200
changeset 916 afd5a7b6da0b
parent 915 78fb42c9ed57
child 917 e70b24f5af87
Test behaviour of setting a term's @id to null when @vocab is used
test-suite/tests/expand-0032-in.jsonld
test-suite/tests/expand-0032-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0032-in.jsonld	Mon Oct 22 18:09:25 2012 +0200
@@ -0,0 +1,8 @@
+{
+  "@context": {
+    "@vocab": "http://example.org/vocab/",
+    "term": { "@id": null }
+  },
+  "@id": "example1",
+  "term": "test"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0032-out.jsonld	Mon Oct 22 18:09:25 2012 +0200
@@ -0,0 +1,6 @@
+[
+  {
+    "@id": "http://json-ld.org/test-suite/tests/example1",
+    "http://example.org/vocab/term": [ { "@value": "test" } ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Mon Oct 22 11:08:44 2012 +0200
+++ b/test-suite/tests/expand-manifest.jsonld	Mon Oct 22 18:09:25 2012 +0200
@@ -161,6 +161,11 @@
       "name": "type-coercion of native types",
       "input": "expand-0031-in.jsonld",
       "expect": "expand-0031-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "setting @id to null has no effect when @vocab is used",
+      "input": "expand-0032-in.jsonld",
+      "expect": "expand-0032-out.jsonld"
     }
   ]
 }