Add test to ensure that the value of @list is always an array
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 19 Dec 2012 18:56:32 +0100
changeset 1066 b88a5aaa4f44
parent 1065 eff829dcd859
child 1067 65f6f9a00739
Add test to ensure that the value of @list is always an array
test-suite/tests/compact-0040-context.jsonld
test-suite/tests/compact-0040-in.jsonld
test-suite/tests/compact-0040-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0040-context.jsonld	Wed Dec 19 18:56:32 2012 +0100
@@ -0,0 +1,2 @@
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0040-in.jsonld	Wed Dec 19 18:56:32 2012 +0100
@@ -0,0 +1,10 @@
+[
+    {
+        "@id": "http://me.markus-lanthaler.com/",
+        "http://example.com/list": {
+            "@list": [
+                "one item"
+            ]
+        }
+    }
+]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0040-out.jsonld	Wed Dec 19 18:56:32 2012 +0100
@@ -0,0 +1,8 @@
+{
+    "@id": "http://me.markus-lanthaler.com/",
+    "http://example.com/list": {
+        "@list": [
+            "one item"
+        ]
+    }
+}
--- a/test-suite/tests/compact-manifest.jsonld	Wed Dec 19 16:25:17 2012 +0100
+++ b/test-suite/tests/compact-manifest.jsonld	Wed Dec 19 18:56:32 2012 +0100
@@ -240,5 +240,11 @@
     "input": "compact-0039-in.jsonld",
     "context": "compact-0039-context.jsonld",
     "expect": "compact-0039-out.jsonld"
+  }, {
+    "@type": ["test:TestCase", "jld:CompactTest"],
+    "name": "Ensure that value of @list is always an array",
+    "input": "compact-0040-in.jsonld",
+    "context": "compact-0040-context.jsonld",
+    "expect": "compact-0040-out.jsonld"
   }]
 }