Add @value expansion test.
authorDave Longley <dlongley@digitalbazaar.com>
Thu, 12 Apr 2012 14:48:00 -0400
changeset 502 f44db14e8ad4
parent 501 7d993d679d1c
child 508 16e640f2ef19
Add @value expansion test.
test-suite/tests/expand-0022-in.jsonld
test-suite/tests/expand-0022-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0022-in.jsonld	Thu Apr 12 14:48:00 2012 -0400
@@ -0,0 +1,12 @@
+{
+  "@context": {
+    "term1": {
+      "@id": "http://example.com/term1",
+      "@type": "http://example.com/type"
+    },
+    "term2": {"@id": "http://example.com/term2"},
+    "@language": "en"
+  },
+  "term1": {"@value": "v1"},
+  "term2": {"@value": "v2"}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0022-out.jsonld	Thu Apr 12 14:48:00 2012 -0400
@@ -0,0 +1,4 @@
+[{
+  "http://example.com/term1": [{"@value": "v1", "@type": "http://example.com/type"}],
+  "http://example.com/term2": [{"@value": "v2", "@language": "en"}]
+}]
\ No newline at end of file
--- a/test-suite/tests/expand-manifest.jsonld	Wed Apr 11 14:46:45 2012 -0700
+++ b/test-suite/tests/expand-manifest.jsonld	Thu Apr 12 14:48:00 2012 -0400
@@ -109,5 +109,10 @@
     "name": "do not remove @graph at top-level if not only property",
     "input": "expand-0021-in.jsonld",
     "expect": "expand-0021-out.jsonld"
+  }, {
+    "@type": ["test:TestCase", "jld:ExpandTest"],
+    "name": "expand value that has only @value key",
+    "input": "expand-0022-in.jsonld",
+    "expect": "expand-0022-out.jsonld"
   }]
 }