Add test for "@base": ""
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Tue, 05 Mar 2013 20:21:07 +0100
changeset 1373 76ea63da4a94
parent 1372 8269c0b8bc84
child 1374 1b51406761a2
Add test for "@base": ""

This addresses #223.
test-suite/tests/expand-0061-in.jsonld
test-suite/tests/expand-0061-out.jsonld
test-suite/tests/expand-manifest.jsonld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0061-in.jsonld	Tue Mar 05 20:21:07 2013 +0100
@@ -0,0 +1,14 @@
+{
+  "@context": {
+    "@base": "",
+    "links": {
+      "@id": "http://example.com/links",
+      "@type": "@id"
+    }
+  },
+  "@id": "base-test",
+  "links": [
+    "simple",
+    "we/do/indeed/../remove/dots"
+  ]
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/expand-0061-out.jsonld	Tue Mar 05 20:21:07 2013 +0100
@@ -0,0 +1,9 @@
+[
+  {
+    "@id": "base-test",
+    "http://example.com/links": [
+      { "@id": "simple" },
+      { "@id": "we/do/remove/dots" }
+    ]
+  }
+]
--- a/test-suite/tests/expand-manifest.jsonld	Tue Mar 05 20:07:36 2013 +0100
+++ b/test-suite/tests/expand-manifest.jsonld	Tue Mar 05 20:21:07 2013 +0100
@@ -308,6 +308,11 @@
       "name": "Overwrite document base with @base and reset it again",
       "input": "expand-0060-in.jsonld",
       "expect": "expand-0060-out.jsonld"
+    }, {
+      "@type": ["test:TestCase", "jld:ExpandTest"],
+      "name": "Set @base to an empty string",
+      "input": "expand-0061-in.jsonld",
+      "expect": "expand-0061-out.jsonld"
     }
   ]
 }