Add test for @language in term definitions
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sat, 07 Apr 2012 02:00:03 +0800
changeset 469 afa13fcf1b45
parent 468 37568a20ec8a
child 470 cfdea5a0c615
Add test for @language in term definitions
test-suite/tests/expand-0018-in.jsonld
test-suite/tests/expand-0018-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0018-in.jsonld	Sat Apr 07 02:00:03 2012 +0800
@@ -0,0 +1,12 @@
+{
+  "@context": {
+    "ex": "http://example.org/vocab#",
+    "@language": "en",
+    "de": { "@id": "ex:german", "@language": "de" },
+    "nolang": { "@id": "ex:nolang", "@language": null }
+  },
+  "@id": "http://example.org/test",
+  "ex:test-default": "hello",
+  "de": "hallo",
+  "nolang": "no language"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0018-out.jsonld	Sat Apr 07 02:00:03 2012 +0800
@@ -0,0 +1,8 @@
+[
+  {
+    "@id": "http://example.org/test",
+    "http://example.org/vocab#test-default": [ { "@value": "hello", "@language": "en" } ],
+    "http://example.org/vocab#german": [ { "@value": "hallo", "@language": "de" } ],
+    "http://example.org/vocab#nolang": [ "no language" ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Sat Apr 07 01:26:00 2012 +0800
+++ b/test-suite/tests/expand-manifest.jsonld	Sat Apr 07 02:00:03 2012 +0800
@@ -89,5 +89,10 @@
     "name": "@graph and @id aliased",
     "input": "expand-0017-in.jsonld",
     "expect": "expand-0017-out.jsonld"
+  }, {
+    "@type": ["test:TestCase", "jld:ExpandTest"],
+    "name": "override default @language in terms",
+    "input": "expand-0018-in.jsonld",
+    "expect": "expand-0018-out.jsonld"
   }]
 }