Add compaction test for multiple input contexts w/one output context.
authorDave Longley <dlongley@digitalbazaar.com>
Thu, 19 Sep 2013 16:37:13 -0400
changeset 1998 a7011fdf759b
parent 1997 068534fb80b2
child 1999 e87980e7c416
Add compaction test for multiple input contexts w/one output context.
test-suite/tests/compact-0071-context.jsonld
test-suite/tests/compact-0071-in.jsonld
test-suite/tests/compact-0071-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0071-context.jsonld	Thu Sep 19 16:37:13 2013 -0400
@@ -0,0 +1,5 @@
+{
+  "@context": {
+    "foo": "http://example.com/foo"
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0071-in.jsonld	Thu Sep 19 16:37:13 2013 -0400
@@ -0,0 +1,9 @@
+{
+  "@context": [{
+    "foo": "http://example.com/foo"
+  }, {
+    "bar": "http://example.com/bar"
+  }],
+  "foo": "foo-value",
+  "bar": "bar-value"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0071-out.jsonld	Thu Sep 19 16:37:13 2013 -0400
@@ -0,0 +1,7 @@
+{
+  "@context": {
+    "foo": "http://example.com/foo"
+  },
+  "foo": "foo-value",
+  "http://example.com/bar": "bar-value"
+}
--- a/test-suite/tests/compact-manifest.jsonld	Mon Sep 16 01:56:29 2013 -0400
+++ b/test-suite/tests/compact-manifest.jsonld	Thu Sep 19 16:37:13 2013 -0400
@@ -569,6 +569,14 @@
       "input": "compact-0070-in.jsonld",
       "context": "compact-0070-context.jsonld",
       "expect": "compact-0070-out.jsonld"
+    }, {
+      "@id": "#t0071",
+      "@type": ["jld:PositiveEvaluationTest", "jld:CompactTest"],
+      "name": "input has multiple @contexts, output has one",
+      "purpose": "Expanding input with multiple @contexts and compacting with just one doesn't output undefined properties",
+      "input": "compact-0071-in.jsonld",
+      "context": "compact-0071-context.jsonld",
+      "expect": "compact-0071-out.jsonld"
     }
   ]
 }