Add simple compaction test for annotation maps
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sun, 09 Dec 2012 19:14:42 +0100
changeset 1013 b51f1be1131f
parent 1012 cb2f80f0beb6
child 1014 966933d6e7c3
Add simple compaction test for annotation maps

This addresses #196.
test-suite/tests/compact-0029-context.jsonld
test-suite/tests/compact-0029-in.jsonld
test-suite/tests/compact-0029-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0029-context.jsonld	Sun Dec 09 19:14:42 2012 +0100
@@ -0,0 +1,5 @@
+{
+  "@context": {
+    "author": {"@id": "http://example.com/vocab/author", "@container": "@annotation" }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0029-in.jsonld	Sun Dec 09 19:14:42 2012 +0100
@@ -0,0 +1,10 @@
+[{
+   "@id": "http://example.com/article",
+   "http://example.com/vocab/author": [{
+      "@id": "http://example.org/person/1",
+      "@annotation": "regular"
+   }, {
+      "@id": "http://example.org/guest/cd24f329aa",
+      "@annotation": "guest"
+   }]
+}]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0029-out.jsonld	Sun Dec 09 19:14:42 2012 +0100
@@ -0,0 +1,17 @@
+{
+   "@context": {
+      "author": {
+         "@id": "http://example.com/vocab/author",
+         "@container": "@annotation"
+      }
+   },
+   "@id": "http://example.com/article",
+   "author": {
+      "regular": {
+         "@id": "http://example.org/person/1"
+      },
+      "guest": {
+         "@id": "http://example.org/guest/cd24f329aa"
+      }
+   }
+}
--- a/test-suite/tests/compact-manifest.jsonld	Sun Dec 09 00:39:18 2012 +0100
+++ b/test-suite/tests/compact-manifest.jsonld	Sun Dec 09 19:14:42 2012 +0100
@@ -174,5 +174,11 @@
     "input": "compact-0028-in.jsonld",
     "context": "compact-0028-context.jsonld",
     "expect": "compact-0028-out.jsonld"
+  }, {
+    "@type": ["test:TestCase", "jld:CompactTest"],
+    "name": "Simple @annotation map",
+    "input": "compact-0029-in.jsonld",
+    "context": "compact-0029-context.jsonld",
+    "expect": "compact-0029-out.jsonld"
   }]
 }