Add test for no @context in frame, but @graph output.
authorDave Longley <dlongley@digitalbazaar.com>
Sun, 15 Apr 2012 19:09:18 -0400
changeset 519 0dc0ed3355cf
parent 518 ebe95ba2fefa
child 520 3dd04d2fbc06
Add test for no @context in frame, but @graph output.
test-suite/tests/frame-0018-frame.jsonld
test-suite/tests/frame-0018-in.jsonld
test-suite/tests/frame-0018-out.jsonld
test-suite/tests/frame-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/frame-0018-frame.jsonld	Sun Apr 15 19:09:18 2012 -0400
@@ -0,0 +1,4 @@
+{
+  "@type": ["http://example.org/vocab#Library"],
+  "http://example.org/vocab#contains": [{}]
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/frame-0018-in.jsonld	Sun Apr 15 19:09:18 2012 -0400
@@ -0,0 +1,16 @@
+{
+  "@context": {
+    "ex": "http://example.org/vocab#",
+    "ex:contains": {"@type": "@id"}
+  },
+  "@graph": [
+    {
+      "@id": "http://example.org/test/#library",
+      "@type": "ex:Library",
+      "ex:contains": "http://example.org/test#book"
+    },
+    {
+      "@id": "http://example.org/test#book"
+    }
+  ]
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/frame-0018-out.jsonld	Sun Apr 15 19:09:18 2012 -0400
@@ -0,0 +1,7 @@
+{
+  "@graph": [{
+    "@id": "http://example.org/test/#library",
+    "@type": "http://example.org/vocab#Library",
+    "http://example.org/vocab#contains": {"@id": "http://example.org/test#book"}
+  }]
+}
\ No newline at end of file
--- a/test-suite/tests/frame-manifest.jsonld	Sun Apr 15 18:41:02 2012 -0400
+++ b/test-suite/tests/frame-manifest.jsonld	Sun Apr 15 19:09:18 2012 -0400
@@ -106,5 +106,11 @@
       "input": "frame-0017-in.jsonld",
       "frame": "frame-0017-frame.jsonld",
       "expect": "frame-0017-out.jsonld"
+   }, {
+      "@type": ["test:TestCase", "jld:FrameTest"],
+      "name": "no frame @context but @graph output",
+      "input": "frame-0018-in.jsonld",
+      "frame": "frame-0018-frame.jsonld",
+      "expect": "frame-0018-out.jsonld"
    }]
 }