Add relative IRIs compaction test.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0066-context.jsonld Thu Feb 28 16:02:56 2013 -0500
@@ -0,0 +1,5 @@
+{
+ "@context": {
+ "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0066-in.jsonld Thu Feb 28 16:02:56 2013 -0500
@@ -0,0 +1,34 @@
+[
+ {
+ "@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/compact-0066-in.jsonld#fragment-works",
+ "http://json-ld.org/test-suite/tests/compact-0066-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/compact-0066-in.jsonld#fragment-works" },
+ { "@id": "http://json-ld.org/test-suite/tests/compact-0066-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/test-suite/parent#fragment" },
+ { "@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" }
+ ]
+ } ]
+ }
+]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-suite/tests/compact-0066-out.jsonld Thu Feb 28 16:02:56 2013 -0500
@@ -0,0 +1,33 @@
+{
+ "@context": {
+ "links": { "@id": "http://www.example.com/link", "@type": "@id", "@container": "@list" }
+ },
+ "@id": "relativeIris",
+ "@type": [
+ "http://json-ld.org/test-suite/tests/link",
+ "http://json-ld.org/test-suite/tests/compact-0066-in.jsonld#fragment-works",
+ "http://json-ld.org/test-suite/tests/compact-0066-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"
+ ],
+ "links": [
+ "link",
+ "#fragment-works",
+ "?query=works",
+ "./",
+ "../",
+ "../parent",
+ "../parent#fragment",
+ "../../parent-parent-eq-root",
+ "../../still-root",
+ "../../too-many-dots",
+ "../../absolute",
+ "http://example.org/scheme-relative"
+ ]
+}
--- a/test-suite/tests/compact-manifest.jsonld Thu Feb 28 16:02:43 2013 -0500
+++ b/test-suite/tests/compact-manifest.jsonld Thu Feb 28 16:02:56 2013 -0500
@@ -396,6 +396,12 @@
"input": "compact-0065-in.jsonld",
"context": "compact-0065-context.jsonld",
"expect": "compact-0065-out.jsonld"
+ }, {
+ "@type": ["test:TestCase", "jld:CompactTest"],
+ "name": "Relative IRIs",
+ "input": "compact-0066-in.jsonld",
+ "context": "compact-0066-context.jsonld",
+ "expect": "compact-0066-out.jsonld"
}
]
}