Add compaction test which tests distinction between no language mapping and null language mapping
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 11 Feb 2013 10:59:22 +0100
changeset 1204 ab406b72311f
parent 1203 e093809b1c2f
child 1205 d9d0ce837e30
Add compaction test which tests distinction between no language mapping and null language mapping
test-suite/tests/compact-0048-context.jsonld
test-suite/tests/compact-0048-in.jsonld
test-suite/tests/compact-0048-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0048-context.jsonld	Mon Feb 11 10:59:22 2013 +0100
@@ -0,0 +1,10 @@
+{
+  "@context": {
+    "@language": "de",
+    "propertyLanguageNull": {
+      "@id": "http://example.com/property",
+      "@language": null
+    },
+    "propertyNoLang": "http://example.com/property"
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0048-in.jsonld	Mon Feb 11 10:59:22 2013 +0100
@@ -0,0 +1,3 @@
+{
+   "http://example.com/property": 5
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0048-out.jsonld	Mon Feb 11 10:59:22 2013 +0100
@@ -0,0 +1,11 @@
+{
+   "@context": {
+      "@language": "de",
+      "propertyLanguageNull": {
+         "@id": "http://example.com/property",
+         "@language": null
+      },
+      "propertyNoLang": "http://example.com/property"
+   },
+   "propertyNoLang": 5
+}
--- a/test-suite/tests/compact-manifest.jsonld	Sun Feb 10 14:41:10 2013 -0500
+++ b/test-suite/tests/compact-manifest.jsonld	Mon Feb 11 10:59:22 2013 +0100
@@ -288,6 +288,12 @@
       "input": "compact-0047-in.jsonld",
       "context": "compact-0047-context.jsonld",
       "expect": "compact-0047-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "Distinguish between no language mapping a mapping to null",
+      "input": "compact-0048-in.jsonld",
+      "context": "compact-0048-context.jsonld",
+      "expect": "compact-0048-out.jsonld"
     }
   ]
 }