Fix expand-0062
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Wed, 06 Mar 2013 15:47:16 +0100
changeset 1378 09adb8f92c46
parent 1377 79cb9bbf75ce
child 1379 363c5e2eca20
Fix expand-0062

The algorithm in http://tools.ietf.org/html/rfc3986#section-5.2.2 produces different results for IRI references starting with "../" etc.

@dlongley, let me know if you disagree.

This addresses #223.
test-suite/tests/expand-0062-out.jsonld
--- a/test-suite/tests/expand-0062-out.jsonld	Wed Mar 06 15:32:37 2013 +0100
+++ b/test-suite/tests/expand-0062-out.jsonld	Wed Mar 06 15:47:16 2013 +0100
@@ -5,12 +5,12 @@
         "link",
         "#fragment-works",
         "?query=works",
-        "./",
-        "../",
-        "../parent",
-        "../../parent-parent-eq-root",
-        "../../../../../still-root",
-        "../../../../../too-many-dots",
+        "/",
+        "/",
+        "/parent",
+        "/parent-parent-eq-root",
+        "/still-root",
+        "/too-many-dots",
         "/absolute",
         "//example.org/scheme-relative"
     ],
@@ -19,12 +19,12 @@
         { "@id": "link" },
         { "@id": "#fragment-works" },
         { "@id": "?query=works" },
-        { "@id": "./" },
-        { "@id": "../" },
-        { "@id": "../parent" },
-        { "@id": "../../parent-parent-eq-root" },
-        { "@id": "../../../../../still-root" },
-        { "@id": "../../../../../too-many-dots" },
+        { "@id": "/" },
+        { "@id": "/" },
+        { "@id": "/parent" },
+        { "@id": "/parent-parent-eq-root" },
+        { "@id": "/still-root" },
+        { "@id": "/too-many-dots" },
         { "@id": "/absolute" },
         { "@id": "//example.org/scheme-relative" },
         { "@id": "//example.org/scheme-relative" },