Add relative IRI test
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Thu, 16 Aug 2012 19:16:26 +0200
changeset 812 004fddff90d2
parent 811 207f61cbd25c
child 813 fa532f0d901d
Add relative IRI test
test-suite/tests/expand-0029-in.jsonld
test-suite/tests/expand-0029-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0029-in.jsonld	Thu Aug 16 19:16:26 2012 +0200
@@ -0,0 +1,32 @@
+{
+  "@context": {
+    "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+  },
+  "@id": "relativeIris",
+  "@type": [
+    "link",
+    "#fragment-works",
+    "?query=works",
+    "./",
+    "../",
+    "../parent",
+    "../../parent-parent-eq-root",
+    "../../../../../still-root",
+    "../.././.././../../too-many-dots",
+    "/absolute",
+    "//example.org/scheme-relative"
+  ],
+  "links": [
+    "link",
+    "#fragment-works",
+    "?query=works",
+    "./",
+    "../",
+    "../parent",
+    "../../parent-parent-eq-root",
+    "./../../../useless/../../../still-root",
+    "../.././.././../../too-many-dots",
+    "/absolute",
+    "//example.org/scheme-relative"
+  ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0029-out.jsonld	Thu Aug 16 19:16:26 2012 +0200
@@ -0,0 +1,33 @@
+[
+  {
+    "@id": "http://json-ld.org/test-suite/tests/relativeIris",
+    "@type": [
+        "http://json-ld.org/test-suite/tests/link",
+        "http://json-ld.org/test-suite/tests/expand-0029-in.jsonld#fragment-works",
+        "http://json-ld.org/test-suite/tests/expand-0029-in.jsonld?query=works",
+        "http://json-ld.org/test-suite/tests/",
+        "http://json-ld.org/test-suite/",
+        "http://json-ld.org/test-suite/parent",
+        "http://json-ld.org/parent-parent-eq-root",
+        "http://json-ld.org/still-root",
+        "http://json-ld.org/too-many-dots",
+        "http://json-ld.org/absolute",
+        "http://example.org/scheme-relative"
+    ],
+    "http://www.example.com/link": [ {
+      "@list": [
+        { "@id": "http://json-ld.org/test-suite/tests/link" },
+        { "@id": "http://json-ld.org/test-suite/tests/expand-0029-in.jsonld#fragment-works" },
+        { "@id": "http://json-ld.org/test-suite/tests/expand-0029-in.jsonld?query=works" },
+        { "@id": "http://json-ld.org/test-suite/tests/" },
+        { "@id": "http://json-ld.org/test-suite/" },
+        { "@id": "http://json-ld.org/test-suite/parent" },
+        { "@id": "http://json-ld.org/parent-parent-eq-root" },
+        { "@id": "http://json-ld.org/still-root" },
+        { "@id": "http://json-ld.org/too-many-dots" },
+        { "@id": "http://json-ld.org/absolute" },
+        { "@id": "http://example.org/scheme-relative" }
+      ]
+    } ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Thu Aug 16 17:43:06 2012 +0200
+++ b/test-suite/tests/expand-manifest.jsonld	Thu Aug 16 19:16:26 2012 +0200
@@ -146,6 +146,11 @@
       "name": "Use @vocab in properties and @type but not in @id",
       "input": "expand-0028-in.jsonld",
       "expect": "expand-0028-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "Relative IRIs",
+      "input": "expand-0029-in.jsonld",
+      "expect": "expand-0029-out.jsonld"
     }
   ]
 }