Add test to reset default language
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 17 Dec 2012 18:26:21 +0100
changeset 1053 06e805ca1722
parent 1052 1172205b72c3
child 1054 61b13615d866
Add test to reset default language
test-suite/tests/expand-0041-in.jsonld
test-suite/tests/expand-0041-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0041-in.jsonld	Mon Dec 17 18:26:21 2012 +0100
@@ -0,0 +1,14 @@
+{
+  "@context": {
+    "property": "http://example.com/property",
+    "nested": "http://example.com/nested",
+    "@language": "en"
+  },
+  "property": "this is English",
+  "nested": {
+    "@context": {
+      "@language": null
+    },
+    "property": "and this is a plain string"
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0041-out.jsonld	Mon Dec 17 18:26:21 2012 +0100
@@ -0,0 +1,10 @@
+[
+  {
+    "http://example.com/property": [ { "@value": "this is English", "@language": "en" } ],
+    "http://example.com/nested": [
+      {
+        "http://example.com/property": [ { "@value": "and this is a plain string" } ]
+      }
+    ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Mon Dec 17 14:50:48 2012 +0100
+++ b/test-suite/tests/expand-manifest.jsonld	Mon Dec 17 18:26:21 2012 +0100
@@ -206,6 +206,11 @@
       "name": "Only invoke language and annotation map expansion if the value is a JSON object",
       "input": "expand-0040-in.jsonld",
       "expect": "expand-0040-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "Reset the default language",
+      "input": "expand-0041-in.jsonld",
+      "expect": "expand-0041-out.jsonld"
     }
   ]
 }