Test that empty arrays are maintained in expansion for property generators
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 20 Dec 2012 18:44:58 +0100
changeset 1072 72220e35186f
parent 1071 284148de2260
child 1073 dcb6098bacd9
Test that empty arrays are maintained in expansion for property generators
test-suite/tests/expand-0042-in.jsonld
test-suite/tests/expand-0042-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0042-in.jsonld	Thu Dec 20 18:44:58 2012 +0100
@@ -0,0 +1,9 @@
+{
+  "@context": {
+    "prop": "http://example.com/prop/",
+    "property_generator": {
+      "@id": [ "prop:1", "prop:2", "prop:3" ]
+    }
+  },
+  "property_generator": []
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0042-out.jsonld	Thu Dec 20 18:44:58 2012 +0100
@@ -0,0 +1,7 @@
+[
+  {
+    "http://example.com/prop/1": [],
+    "http://example.com/prop/2": [],
+    "http://example.com/prop/3": []
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Thu Dec 20 18:38:11 2012 +0100
+++ b/test-suite/tests/expand-manifest.jsonld	Thu Dec 20 18:44:58 2012 +0100
@@ -211,6 +211,11 @@
       "name": "Reset the default language",
       "input": "expand-0041-in.jsonld",
       "expect": "expand-0041-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "Keep empty arrays when expanding property generators",
+      "input": "expand-0042-in.jsonld",
+      "expect": "expand-0042-out.jsonld"
     }
   ]
 }