Add test using language maps with @vocab, a default language, and a colliding property
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 03 Dec 2012 19:35:20 +0100
changeset 978 a098d9cd2b0c
parent 977 d56b0ea95dbf
child 979 4ab11d20197d
Add test using language maps with @vocab, a default language, and a colliding property
test-suite/tests/expand-0035-in.jsonld
test-suite/tests/expand-0035-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0035-in.jsonld	Mon Dec 03 19:35:20 2012 +0100
@@ -0,0 +1,18 @@
+{
+  "@context": {
+    "@vocab": "http://example.com/vocab/",
+    "@language": "it",
+    "label": {
+      "@container": "@language"
+    }
+  },
+  "@id": "http://example.com/queen",
+  "label": {
+    "en": "The Queen",
+    "de": [ "Die Königin", "Ihre Majestät" ]
+  },
+  "http://example.com/vocab/label": [
+    "Il re",
+    { "@value": "The king", "@language": "en" }
+  ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0035-out.jsonld	Mon Dec 03 19:35:20 2012 +0100
@@ -0,0 +1,21 @@
+[{
+   "@id": "http://example.com/queen",
+   "http://example.com/vocab/label": [
+      {
+         "@value": "Il re",
+         "@language": "it"
+      }, {
+         "@value": "The king",
+         "@language": "en"
+      }, {
+         "@value": "The Queen",
+         "@language": "en"
+      }, {
+         "@value": "Die Königin",
+         "@language": "de"
+      }, {
+         "@value": "Ihre Majestät",
+         "@language": "de"
+      }
+   ]
+}]
--- a/test-suite/tests/expand-manifest.jsonld	Mon Dec 03 19:31:01 2012 +0100
+++ b/test-suite/tests/expand-manifest.jsonld	Mon Dec 03 19:35:20 2012 +0100
@@ -176,6 +176,11 @@
       "name": "Multiple properties expanding to the same IRI",
       "input": "expand-0034-in.jsonld",
       "expect": "expand-0034-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "Using language maps with @vocab, a default language, and a colliding property",
+      "input": "expand-0035-in.jsonld",
+      "expect": "expand-0035-out.jsonld"
     }
   ]
 }