Test that if property generator doesn't match, a term is used instead
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 11 Feb 2013 11:48:28 +0100
changeset 1206 784b25bebcf5
parent 1205 d9d0ce837e30
child 1207 6ce9f7bf07dd
Test that if property generator doesn't match, a term is used instead
test-suite/tests/compact-0050-context.jsonld
test-suite/tests/compact-0050-in.jsonld
test-suite/tests/compact-0050-out.jsonld
test-suite/tests/compact-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0050-context.jsonld	Mon Feb 11 11:48:28 2013 +0100
@@ -0,0 +1,7 @@
+{
+  "@context": {
+    "propertyA": "http://example.org/A",
+    "propertyB": "http://example.org/B",
+    "gen": { "@id": [ "http://example.org/A", "http://example.org/B" ] }
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0050-in.jsonld	Mon Feb 11 11:48:28 2013 +0100
@@ -0,0 +1,4 @@
+{
+  "http://example.org/A": "A",
+  "http://example.org/B": "B"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0050-out.jsonld	Mon Feb 11 11:48:28 2013 +0100
@@ -0,0 +1,9 @@
+{
+  "@context": {
+    "propertyA": "http://example.org/A",
+    "propertyB": "http://example.org/B",
+    "gen": { "@id": [ "http://example.org/A", "http://example.org/B" ] }
+  },
+  "propertyA": "A",
+  "propertyB": "B"
+}
--- a/test-suite/tests/compact-manifest.jsonld	Mon Feb 11 11:31:40 2013 +0100
+++ b/test-suite/tests/compact-manifest.jsonld	Mon Feb 11 11:48:28 2013 +0100
@@ -300,6 +300,12 @@
       "input": "compact-0049-in.jsonld",
       "context": "compact-0049-context.jsonld",
       "expect": "compact-0049-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:CompactTest"],
+      "name": "If property generator doesn't match, fall back to term",
+      "input": "compact-0050-in.jsonld",
+      "context": "compact-0050-context.jsonld",
+      "expect": "compact-0050-out.jsonld"
     }
   ]
 }